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

Image corruption after editing/cropping an image #1134

Closed
banshee24 opened this issue Sep 6, 2021 · 10 comments
Closed

Image corruption after editing/cropping an image #1134

banshee24 opened this issue Sep 6, 2021 · 10 comments
Assignees
Milestone

Comments

@banshee24
Copy link

System information:

  • Windows OS version: Win10 Pro 20H2
  • ImageGlass version: 8.2.6.6

Actual behavior:

after editing/cropping an image, thumbnail picture of the image is not refreshed

Expected behavior:

new thumbnail image should be refreshed as edited image

Screenshots:

https://pasteboard.co/Kjk2P6O.png
https://pasteboard.co/Kjk3aVJ.png

@fire-eggs
Copy link
Collaborator

Probable duplicate of #1059 or #754

Please let us know if the "Preserve Modify Date on Save" setting is enabled.

@banshee24
Copy link
Author

banshee24 commented Oct 24, 2021 via email

@fire-eggs
Copy link
Collaborator

fire-eggs commented Oct 24, 2021

Enabling the "Preserve Modify Date on Save" is what is causing the problem. Windows Explorer will only update the thumbnail when the modify date is changed.

[Modified your reply to remove your phone #]

@banshee24
Copy link
Author

banshee24 commented Oct 24, 2021 via email

@fire-eggs
Copy link
Collaborator

OK, that sounds like a nasty problem! I'll take a look. For completeness, could you tell me what file format the original image is in? (png, jpeg, etc) Thanks!

@fire-eggs fire-eggs changed the title after editing/cropping an image, thumbnail picture of the image is not refreshed Image corruption after editing/cropping an image Oct 25, 2021
@banshee24
Copy link
Author

banshee24 commented Oct 25, 2021 via email

@fire-eggs
Copy link
Collaborator

For .JPG if you close the photo quickly just after editing the photo, it corrupts the file permanently, but if you wait just a bit after editing and then close the program it does not corrupt the file. For PNG; if you close the program quickly after editing, it just does not apply the changes on file.

Sorry for the late reply, my day went all sideways.

I've not had a chance to dig into the details, but what you describe matches what I recall. The process of saving a file is not currently coordinated with app shutdown. This means IG can shut down during the middle of saving the file, resulting in corruption or no output.

Waiting a little bit after editing the file before closing IG should work. Apparently, "preserve modify date on save" also solves the problem, but I don't yet know why! I'll poke at this when I have a chance, you should use one of the workarounds in the meantime ...

May I also send you suggestions time to time in terms of design or you are working on just debugging? I really enjoy using this program, its pure design and availability of interface personalization is really cool.

Thanks, and glad to hear it!

I have no objection to reading your design suggestions, might provide me with some inspiration. Feel free to open an issue containing your thoughts. It'll be up to @d2phap to decide if anything is incorporated.

@fire-eggs
Copy link
Collaborator

Recently posted to ImageGlass+ group:

Warning: ImageGlas destroys images if saving after editing set and viewer scolled forwards and backwards shortly after editing!

Again, the same problem: image save is asynchronous but not coordinated. By navigating backward, the user is hitting the image during the save, causing file corruption.

@gsokoll
Copy link

gsokoll commented Jan 4, 2022

How about disabling the navigation buttons while saving is underway? I've had the unpleasant experience of several images being irreversibly corrupted by this bug. ImageGlass now uninstalled...

@d2phap d2phap added this to the Issues 8.3 milestone Jan 12, 2022
d2phap added a commit that referenced this issue Jan 12, 2022
@d2phap
Copy link
Owner

d2phap commented Jan 12, 2022

Please try the latest build of IG Moon which is to attempts to fix this issue.
https://imageglass.org/moon
Note that, the thumbnail bar is flashing when the app is busy, I will fix later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants