Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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!
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!
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).
Did anything happen to fix this? I am experiencing the same issue.
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.
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?
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.
Thanks for the reply Doug, I have changed my code to use imageprocessor now and all seems ok.
Thanks for your reply anyway.
Don't use imagegen any more...use image processor.
eg try rendering just using <img src="your-image?width=600"> instead of the imagegen url
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted