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

Rotate the photo #10

Closed
mmo1383 opened this issue Aug 1, 2021 · 5 comments
Closed

Rotate the photo #10

mmo1383 opened this issue Aug 1, 2021 · 5 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mmo1383
Copy link

mmo1383 commented Aug 1, 2021

Resizing the image causes it to rotate:

 var image = Image.FromFile("wwwroot/imagesProduct/" + file.FileName);
                    var scalefile = ImageResize.Scale(image, 280, 350);
                    scalefile.SaveAs("wwwroot/ImageResize/" + file.FileName);
@LazZiya
Copy link
Owner

LazZiya commented Aug 1, 2021

Can you share the test image?

btw, it is better to re-write your code as below, so the code can dispose the image object automatically after the using statement:

using(var image = Image.FromFile("wwwroot/imagesProduct/" + file.FileName))
{
    image.Scale(280, 350)
         .SaveAs("wwwroot/ImageResize/" + file.FileName);
}

@mmo1383
Copy link
Author

mmo1383 commented Aug 1, 2021

this image
20210715_113951

@LazZiya LazZiya self-assigned this Aug 2, 2021
@LazZiya LazZiya added bug Something isn't working good first issue Good for newcomers labels Aug 2, 2021
@LazZiya
Copy link
Owner

LazZiya commented Aug 2, 2021

Thank you @mmo1383, I checked your image and it seems the code is ignoring the image rotation. I will publish a hotfix soon.

@LazZiya LazZiya closed this as completed in 31ea530 Aug 2, 2021
@LazZiya
Copy link
Owner

LazZiya commented Aug 2, 2021

fix is done in v4.1.0

@mmo1383
Copy link
Author

mmo1383 commented Aug 2, 2021

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants