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 an image 90 degrees with mode=false cuts left part #821

Closed
ghost opened this issue Nov 24, 2019 · 2 comments
Closed

Rotate an image 90 degrees with mode=false cuts left part #821

ghost opened this issue Nov 24, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 24, 2019

Expected Behavior

If I rotate the follow image 90 degrees with the follow code, I expect the image is rotated and not cut if I set the mode param to false

Example image:
example

Example code:

const Jimp = require("jimp");

(async () => {
    const example_image = await Jimp.read(__dirname + "/example.png");

    example_image.rotate(90, false);

    await example_image.write(__dirname + "/example_rotated_result.png");
})();

Expect result image:
example_rotated_result_v0_8_excpet

Current Behavior

The current behavior is, that the image is rotated like expected but is moved 1px to left, means the first left part is cut and there's a transparent part at right

Wrong result image:
example_rotated_result_v0_8_wrong

Failure Information (for bugs)

If I use an old version it works like expected.
The last working version is v0.5.6 - this bug seems to occur since v0.6.0

Correct result image:
example_rotated_result_v0_5_correct

I suspect the changes in #708

Steps to Reproduce

See above code

Screenshots
See above images

Context

Failure Logs

No error logs occurs

@ghost
Copy link
Author

ghost commented Nov 24, 2019

Maybe it's the same bug like #721

@ghost
Copy link
Author

ghost commented May 24, 2020

I had fixed this for me with #721 (comment)

@ghost ghost closed this as completed Feb 7, 2021
This issue was closed.
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

0 participants