[mythtv] mythgallery aspect ratio patch
Kielogl
kielogl at yahoo.com
Sun Nov 11 07:56:04 UTC 2007
Thanks Roo, Nigel,
Have create Ticket #4162: mythgallery aspect ratio patch (along with an updated patch), as suggest.
Cheers, Mark.
Nigel Pearson <nigel at ind.tansu.com.au> wrote: > + // calculate display pixel aspect ratio
> + Display *display = XOpenDisplay(NULL);
> + int scr = DefaultScreen(display);
> + double pixelaspect =
> + ((double)DisplayWidthMM(display,scr) / (double)screenwidth) /
> + ((double)DisplayHeightMM(display,scr) / (double)screenheight);
> +
> + // calculate image aspect ratio
> + double imageaspect =
> + (double)m_image.width() / (double)m_image.height();
> +
> + QImage img = m_image.smoothScale(
> + (int) (screenheight * imageaspect / pixelaspect * m_zoom),
> + (int) (screenheight * m_zoom),
> + QImage::ScaleFree);
While this does work for X environemnts,
it will not help on OS X, or Windows.
An #ifdef ENABLE_X11 will suffice for now,
but in the long run, some of the video output
code probably needs to be abstracted into
libmyth?
--
Nigel Pearson, nigel at ind.tansu.com.au|"Look at this!
Telstra Net. Eng., Sydney, Australia | Do you think I put this in
Office: 9202 3900 Fax: 9261 3912 | to get better reception?"
Mobile: 0408 664435 Home: 9792 6998 | Batty - Fern Gully
_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20071110/c66ad2b8/attachment.htm
More information about the mythtv-dev
mailing list