Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cpawinsal
Visitor

Pic Interpolation Problem

Hi,

In our channel, we are getting pictures from people's profiles to show them as the placeholder for their channel (seems appropriate). Unfortunately, the pictures we have to work with are all 50 k or less with dimensions around 100 X 100 when they are bigger pictures. I currently interpolate those pictures before passing them to the Roku so that the resizing is happening in a controlled environment where I can try to clean the image as best possible. Here's an example:

Picture start: http://www.socialkast.tv/facebook/pictu ... 25_raw.jpg

SD Interpolation: http://www.socialkast.tv/facebook/pictu ... oku_sd.png

HD Interpolation: http://www.socialkast.tv/facebook/pictu ... oku_hd.png

Terrible right? There is no possible way we've found to blow the images up to fit the poster containers without totally destroying the picture.

To fix this, we have tried to make a combined image. What we do is create a blank png on the server. The blank png is sized for SD and HD poster containers. Then we add the raw image to the center of the blank png and save that new image as the Roku HD and SD poster values. With a different user, check this out:

Picture Start: http://www.socialkast.tv/facebook/pictu ... 61_raw.jpg

SD New Image: http://www.socialkast.tv/facebook/pictu ... oku_sd.png

HD New Image: http://www.socialkast.tv/facebook/pictu ... oku_hd.png

If you right click on those images, you'll see that they are the proper size for the Roku poster containers. Unfortunately, it seems the Roku SDK is too smart for my own good on this one. It can tell that the white space of the image is white. So, it ignores the white space we've purposely put in and it interpolates the picture in the center of the image anyways! It looks even worse now on the Roku even though what you see on the web is pretty clear.

Is there some way I can trick the software to force it to not ignore my white space in the image? Or, is there some alternative way I can go about this so that my images on the Roku are clean?

Best,
Al
0 Kudos
5 REPLIES 5
cpawinsal
Visitor

Re: Pic Interpolation Problem

Minor correction... the pictures we are getting are 10 k or less (most 2 k).
0 Kudos
TheEndless
Channel Surfer

Re: Pic Interpolation Problem

I just tested one of your images with the white filler on my end and it displayed as expected (with the white border) on both a poster screen and a springboard screen. Is it possible that either your code is pulling back the wrong image, or you're testing with an image that's cached on the Roku?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
renojim
Community Streaming Expert

Re: Pic Interpolation Problem

I didn't try a Springboard screen, but I did try a poster screen and got the same result as TheEndless. I'll bet he's right about the caching. I've run into overzealous caching issues myself. You should reboot your box or make sure the url to the photo is something new.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
cpawinsal
Visitor

Re: Pic Interpolation Problem

Ah ha! That makes sense. Must have been cached on my Roku. I have to run out now. But, I'll hard boot my Roku and see if that fixes it.

That will be one of the easiest bugs ever gotten rid of! Thanks for testing for me.
0 Kudos
GandK-Geoff
Visitor

Re: Pic Interpolation Problem

It's worth noting that your server-side interpolation could be improved a bit. A couple minutes fiddling gave me this:

    convert 1148552625_raw.jpg -unsharp 0 -adaptive-resize 148x212 -gravity center -extent 148x212 new_hd7.png


I don't happen to know offhand what the ideal upscaled size is, so I just used the same size you had -- but whatever you use, remember to replace '148x212' in both places. The result is still far from ideal (the original image is not only very small, but had significant JPEG artifacts). However, I think it looks a lot better than the stretched and blurry version.

NB: I am not an expert at photo manipulation; these settings just made sense glancing over the ImageMagick manpage.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.