Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images with EXIF get rotated after processing #451

Closed
kjyotiram opened this issue Oct 19, 2022 · 11 comments
Closed

images with EXIF get rotated after processing #451

kjyotiram opened this issue Oct 19, 2022 · 11 comments

Comments

@kjyotiram
Copy link

kjyotiram commented Oct 19, 2022

Images are getting rotated 90 degrees based on the EXIF data of the images, but i need the images to be processed as they are uploaded. Here is the snippet below that i am using:
var instructions = new Instructions
{
Width = maxWidth,
Height = maxHeight,
Format = "jpg",
AutoRotate=false,
SourceRotate=0,
SourceFlip=0
};

        ImageBuilder.Current.Build(byteImageIn, outStream, instructions);
        resized = outStream.ToArray();

i am using ImageResizer V4 so the autorotate is built in, so how do i process the images without getting rotated once uploaded?

I tried removing the exif data even so the images are getting rotated after processing. Any idea on this, is it due to the Height and width differences.

@kjyotiram kjyotiram changed the title Some get rotated after resizing images with EXIF get rotated after processing Oct 19, 2022
@lilith
Copy link
Member

lilith commented Nov 17, 2022

Setting autorotate to false should absolutely be preventing exif from causing rotation. However, you are saying that it happens even without exif data. Can you upload the before and after images and your resizer.debug (just the plugins and config)?

@kjyotiram
Copy link
Author

The images which we take in Potrait mode by rotating the phone are the one getting rotated. I tried processing after removing the EXIF data by converting image into BitMap Image, that didn't work as well

@lilith
Copy link
Member

lilith commented Nov 18, 2022 via email

@kjyotiram
Copy link
Author

PFA images, even when i mark AutoRotate false still the image gets rotated and stored.
sample images.zip

@lilith
Copy link
Member

lilith commented Nov 28, 2022 via email

@kjyotiram
Copy link
Author

I have attached in the ZIP folder, please check and getting the email address like this: @.***

@lilith
Copy link
Member

lilith commented Nov 29, 2022

Sorry, github redacted my email

@lilith
Copy link
Member

lilith commented Nov 29, 2022

I don't have enough information to help. If the images you e-mailed were before and after images, I don't think you're using ImageResizer - however, I would need your /resizer.debug page. https://imageresizing.net/docs/v4/geterror

If you're not using it on the web, call ImageResizer.Configuration.Config.Current.WriteDiagnosticsTo(string path)

@kjyotiram
Copy link
Author

No, those are not before after images. They are two different images one taken rotated in portrait mode and one in normal portrait mode. Can you please try processing those two and check if you able to apply AutoRotate-False for those scenarios

@lilith
Copy link
Member

lilith commented Nov 30, 2022

I need the diagnostics page to attempt to reproduce this.

@lilith
Copy link
Member

lilith commented Jan 20, 2023

Can you provide the diagnostics page?

@lilith lilith closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants