freevo / freevo1

Freevo 1.x (dead)
http://freevo.github.io/index.html
GNU General Public License v2.0
7 stars 10 forks source link

freevo shows images with incorrect rotation #17

Open kovalvalerii opened 11 years ago

kovalvalerii commented 11 years ago

Hi, Because of pygame issue I added (at least for 1.9.0) an option to auto rotate image to see them rotated on correct angle. It worked for 1.9.0 but it stopped to work for 1.9.2! It's regression.

I fixed the issue when I commented the lines in osd.py: [skip] if bbx or bby or bbw or bbh: imbb = pygame.Surface((bbw, bbh)) imbb.blit(image, (0, 0), (bbx, bby, bbw, bbh)) image = imbb

    #if config.IMAGEVIEWER_REVERSED_IMAGES:
    #    rotation = (360 - rotation) % 360
    if scaling:

[skip]

Someone, please look on it at tell me if it's a correct fix from freevo internal behavior's point.

From my point of view it looks like freevo does rotate twice. One time the image is stored in the cache with correct rotation (for ex. -90+180 = 90), but the second time the same image is rotating one more time and the angle becomes 90+180=270 i.e. the same what we had before we started to rotate.

Update #1. I found the rotation-related code was added by charrea6 in skin_utils.py (changeset 5594ef52 » charrea6). I guess it can be a reason of the issue but I'm not sure. Can anyone do review?