From 9ac269fffc88682ea487c3d9efecc07ce3d72417 Mon Sep 17 00:00:00 2001
From: Roger Siddons <dizygotheca@ntlworld.com>
Date: Tue, 3 Feb 2015 00:04:39 +0000
Subject: [PATCH 2/4] Orient before resize
An image is currently re-sized before being orientated. This results in the bottom of portrait-orientated pics going off-screen.
This patch orientates an image before re-sizing it.
diff --git a/mythtv/libs/libmythui/mythuiimage.cpp b/mythtv/libs/libmythui/mythuiimage.cpp
index 03dcc80..e6d321e 100644
a
|
b
|
class ImageLoader |
318 | 318 | |
319 | 319 | if (image && !bFoundInCache) |
320 | 320 | { |
| 321 | if (imProps.isReflected) |
| 322 | image->Reflect(imProps.reflectAxis, imProps.reflectShear, |
| 323 | imProps.reflectScale, imProps.reflectLength, |
| 324 | imProps.reflectSpacing); |
| 325 | |
| 326 | if (imProps.isGreyscale) |
| 327 | image->ToGreyscale(); |
| 328 | |
| 329 | if (imProps.isOriented) |
| 330 | image->Orientation(imProps.orientation); |
| 331 | |
321 | 332 | // Even if an explicit size wasn't defined this image may still need |
322 | 333 | // to be scaled because of a difference between the theme resolution |
323 | 334 | // and the screen resolution. We want to avoid scaling twice. |
… |
… |
class ImageLoader |
359 | 370 | image->setAlphaChannel(mask.alphaChannel()); |
360 | 371 | } |
361 | 372 | |
362 | | if (imProps.isReflected) |
363 | | image->Reflect(imProps.reflectAxis, imProps.reflectShear, |
364 | | imProps.reflectScale, imProps.reflectLength, |
365 | | imProps.reflectSpacing); |
366 | | |
367 | | if (imProps.isGreyscale) |
368 | | image->ToGreyscale(); |
369 | | |
370 | | if (imProps.isOriented) |
371 | | image->Orientation(imProps.orientation); |
372 | | |
373 | 373 | if (!imageReader) |
374 | 374 | GetMythUI()->CacheImage(cacheKey, image); |
375 | 375 | } |