Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Trevor Loader 199 posts 256 karma points
    Aug 19, 2014 @ 03:19
    Trevor Loader
    0

    Images appear rotated

    Hi Doug,

    I think I've discovered a bug where imagegen is not looking at the exif Orientation flag if it exists...and thus the imagegen'ed image appears in the wrong orientation for some cameras.

    As an example, if you take a portrait photo on an iphone or ipad the image is actually saved in landscape but the exif Orientation flag is set to say how it should be rotated for display.  Most browsers for example appear to display the raw image correctly (note that IE11 does not...it displays the image as landscape)...as do most photo display applications on the Mac/PC.  In other words, most of the time you don't actually realise that the photo is saved landscape as nearly everything that you view it with looks at the Orientation flag and rotates the image accordingly for display.

    However, if I change to display an imagegen'ed version of the same image in Chrome for example, the image is now displayed in landscape incorrectly.  Ie, Idon't think imagegen is looking at the exif orientation flag (if it exists).

    Therefore I think one of two things should happen when imagegen'ing an image.  Either the exif data (or at least the orientation flag) should get copied to the imagegen'ed image so that the browser or any application viewing the image displays it in the correct orientation, or imagegen should look at the orientation and physically rotate the image and not copy across the exif data.

    If you are going to physically going to rotate the image, this article might help http://automagical.rationalmind.net/2009/08/25/correct-photo-orientation-using-exif/

    I'll volunteer to test a new build if you are going to tweak your code!

    Cheers
    Trevor

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Aug 19, 2014 @ 13:51
    Douglas Robar
    0

    Hi, Trevor,

    You're right, exif orientation is not considered and probably ought to be. I'll see what I can do to add an option for that. Thanks for the idea!

    cheers,
    doug.

  • Trevor Loader 199 posts 256 karma points
    Aug 20, 2014 @ 00:05
    Trevor Loader
    0

    Hey Doug,

    Is it something that'll go on a future to-do list (ie months away) or is it something you might look into soon?

    (yes I know...its a free product so I shouldn't be pushy...but if its months away I'll need to replace Imagegen with something else as its effecting a live site where the public can upload pictures and some are turning up rotated).

    Cheers
    T

  • David Whiteford 14 posts 84 karma points
    Sep 06, 2016 @ 20:00
    David Whiteford
    0

    Did anything happen to fix this? I am experiencing the same issue.

    Thanks

  • Trevor Loader 199 posts 256 karma points
    Sep 06, 2016 @ 21:16
    Trevor Loader
    0

    I upgraded my Umbraco installation to v7 and use the built in image processor for image manipulation/cropping and that doesn't have the issue.

  • David Whiteford 14 posts 84 karma points
    Sep 06, 2016 @ 21:24
    David Whiteford
    0

    Mmm, I am using the latest version also. The problem only seems to occur when setting the width to a value AND when using a good quality image from a digital camera. The image starts as portrait but gets displayed as landscape when I use image gen to set a width?

    Could you try and replicate?

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Sep 08, 2016 @ 09:52
    Douglas Robar
    0

    Sorry for the trouble, David. It's most likely because the original image from the camera isn't actually a 'portrait' image but only has a setting in the file's exif data that says to rotate the image. ImageGen doesn't support that in v2.9.1, which is why any resizing at all will make it seem as though the image is rotated.

    I've a newer build that does support the exif rotation flag. Drop me a note via my contact form at http://percipientstudios.com/about/contact and I'll send it to you.

    cheers,
    doug.

  • David Whiteford 14 posts 84 karma points
    Sep 08, 2016 @ 10:06
    David Whiteford
    0

    Thanks for the reply Doug, I have changed my code to use imageprocessor now and all seems ok.

    Thanks for your reply anyway.

  • Trevor Loader 199 posts 256 karma points
    Sep 06, 2016 @ 21:45
    Trevor Loader
    0

    Don't use imagegen any more...use image processor.

    http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/#methods

    eg try rendering just using <img src="your-image?width=600"> instead of the imagegen url

Please Sign in or register to post replies

Write your reply to:

Draft