[mythtv] Mythgallery on 16:9 screens

Julian Scheel julian at jusst.de
Thu Jun 17 03:06:35 EDT 2004


Am Mittwoch, 16. Juni 2004 23:41 schrieb Ed Wildgoose:
> This is perfect.  Thanks for the info.  I will try it out ASAP, but this
> is just the info I need (any idea how to change the scale in the non gl
> pixmap?)

After a short look into the code I gues you should modify this line:
m_pixmap = new QPixmap(m_image.smoothScale(screenwidth, screenheight,
                                                       QImage::ScaleMin));

It's in loadImage(). The smoothScale-function keeps the aspect-ratio, but only 
based on the pixels.
You should calculate correct values for height and width (I would first 
calculate the values for height = screenheight, then check if width > 
screenwidth, if it is, calculate values again for width = screenwidth).
Then call smoothScale width width and height and use QImage::ScaleFree as 
third parameter. This will scale the image exactly to the values you 
calculated.

> I have some ideas about tweaking this that I will play with.  Basically
> the bounding box becomes limiting on both width and height depending on
> on whether the pic is landscape or portrait (on a widescreen display at
> least), so I will fiddle with that and see what I can come up with

It seems like I can't follow your thinkings?!

> Thanks for that very useful nugget though!
>
> Ed W

Julian


More information about the mythtv-dev mailing list