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

[Bug]: Restoring state on a cropped image shifts all layers #292

Open
saif-ellafi opened this issue Dec 19, 2024 · 5 comments
Open

[Bug]: Restoring state on a cropped image shifts all layers #292

saif-ellafi opened this issue Dec 19, 2024 · 5 comments
Labels
bug Something isn't working in-progress

Comments

@saif-ellafi
Copy link
Contributor

Package Version

6.0.0

Flutter Version

3.27.1

Platforms

Android, iOS, Web, Windows, macOS, Linux

How to reproduce?

  1. Set some layers on an image
  2. Crop the image
  3. Export state
  4. Load state
  5. Notice all layers will have shifted from where they were, relative to the image, and became smaller
  6. Save
  7. Load state again
  8. Notice all layers will have shifted even further, and became even smaller
  9. repeat...

Set layers

image

Crop image around layers

image

Press "OK" - notice already a shift (but we can reposition manually, at this point

image
image

Restore state

image

Logs (optional)

No response

Example code (optional)

No response

Device Model (optional)

No response

@hm21
Copy link
Owner

hm21 commented Feb 4, 2025

Small update:
I am working on a bug fix in this branch.
The offset issue was caused by the editor exporting the last rendered image size instead of the original rendered image size. However, I also discovered a second issue: when the image fit factor (e.g., "fit to width") changes, the layer shifts and develops an offset in any direction.

@KrishnaTridhya

This comment has been minimized.

@hm21

This comment has been minimized.

@KrishnaTridhya

This comment has been minimized.

@hm21

This comment has been minimized.

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

No branches or pull requests

3 participants