[mythtv-theming] Baseres and metadata art resizing bug?

Mark Perkins perkins1724 at hotmail.com
Sun Sep 29 11:56:43 UTC 2013


> On 29 Sep 2013, at 1:29 am, "Thomas Mashos" <thomas at mashos.com> wrote:
> 
> I kinda feel this should be on the regular or dev mailing list, but
> I'll start here.
> 
> Is baseres suppose to be used for anything else besides to determine
> the coordinates of everything?
> 
> Lets say I've got a theme with a baseres of 7680x4320, but I'm using
> it on a TV that has a resolution of 1920x1080. What should I expect to
> happen to a tv show or video background image (fanart) that has a
> resolution of 1920x1080? I think it's getting resized twice, once to
> 7680x4320, then once again to 1920x1080. I'm only guessing though
> based on how the image looks when this using a 1280x720 theme vs an
> 7680x4320 theme on the same TV 1920x1080 TV.
> 
> Looking at the themecache, the 1280x720 version of our theme has a
> particular piece of fanart that is 1.1M and the 7680x4320 version of
> our theme has the same piece of fanart at 631K
> 
> Is this a bug, or expected behavior? It would seem odd to want to
> resize an image twice, losing quality both times. If it's expected
> behavior, then there is zero reason for me to continue working on this
> 7680x4320 version since none of the artwork will be acceptable until
> people start making 7680x4320 artwork
> 
> Thanks,
> 
> Thomas Mashos
> _______________________________________________
[Mark] Sorry that I don't know the answer, but I think from observations of my system you are 100% correct. My coverart is called by my theme with imagetype of 427x665. On baseres 1280x720 and displaying on a 1680x1050 screen that should scale to 560x970 and indeed when I check my themecache my coverart files are titled 560x969 (near enough). But when I check their actual resolution they are 560x898. Now I do have preserve aspect ratio set but the only way I can see that this resolution could possibly be reached (from their original downloaded res of 400x578) is if they were scaled first to 427x617 (preserve aspect ratio and going to my original imagetype call of 427x665) and then doing a second scale to show the baseres of 1280x720 on my 1680x1050 display (multiply columns by 1.3125 and rows by 1.45833) which distorts the aspect ratio. If they weren't scaled twice and aspect ratio was maintained they would be 560x810 not 560x898.

I suspect the rationale is to allow a theme to display as nicely as possible no matter the differences between theme baseres, display res and original image res.

However as to the crux of your question I couldn't say with any confidence as to whether the actual scaling happens in two parts (with 2 lots of lossy transformation) or only the maths necessary to get the final size (and only 1 lossy transformation) but suspect the former may be far simpler than the later and therefore this may be expected behavior....
Sorry but this is more guesswork than knowledge.


More information about the mythtv-theming mailing list