[GH-ISSUE #19] Overwritten files don't decrease in size #1385

Closed
opened 2026-03-01 18:45:05 +03:00 by kerem · 3 comments
Owner

Originally created by @duarteframos on GitHub (Sep 27, 2016).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/19

One thing I have noticed in the past and has continued happening for several versions now is that if a file is saved overwriting an existing GIF recorded in a previous session it's file size never really decreases even if the new recording is smaller than the original.

Say I record a capture and save it has gif (henceforth called Capture_A.gif) with a file size of 2.5Mb, then close ScreenToGif . I then proceed to open a new session and make a second recording which is considerably shorter than the previous one.

If I save it as Capture_B.gif it has 1.3Mb, but if I turn on the Overwrite option and save it over Capture_A.gif it will still saved with 2.5Mb file regardless of the actual size.

If I go back to the file browser and erase Capture_A.gif and save it again it will correctly present it's 1.3Mb file size.

Is this intended behavior or some sort of bug?

Originally created by @duarteframos on GitHub (Sep 27, 2016). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/19 One thing I have noticed in the past and has continued happening for several versions now is that if a file is saved overwriting an existing GIF recorded in a previous session it's file size never really decreases even if the new recording is smaller than the original. Say I record a capture and save it has gif (henceforth called Capture_A.gif) with a file size of 2.5Mb, then close ScreenToGif . I then proceed to open a new session and make a second recording which is considerably shorter than the previous one. If I save it as Capture_B.gif it has 1.3Mb, but if I turn on the _Overwrite_ option and save it over Capture_A.gif it will still saved with 2.5Mb file regardless of the actual size. If I go back to the file browser and erase Capture_A.gif and save it again it will correctly present it's 1.3Mb file size. Is this intended behavior or some sort of bug?
kerem closed this issue 2026-03-01 18:45:05 +03:00
Author
Owner

@NickeManarin commented on GitHub (Sep 27, 2016):

It was a silly bug and it's fixed.

During the creation of the gif file, I was opening the file and overwriting instead of creating a new one.

It had to do with a wrong flag during a FileStream call.

:)

<!-- gh-comment-id:249753906 --> @NickeManarin commented on GitHub (Sep 27, 2016): It was a silly bug and it's fixed. During the creation of the gif file, I was opening the file and overwriting instead of creating a new one. It had to do with a wrong flag during a FileStream call. :)
Author
Owner

@duarteframos commented on GitHub (Sep 27, 2016):

Wow that was quick, you must have beaten some record of shortest time between a bug report and a bug fix in the history of man kind! :)

Thanks for the fix!

<!-- gh-comment-id:249755445 --> @duarteframos commented on GitHub (Sep 27, 2016): Wow that was quick, you must have beaten some record of shortest time between a bug report and a bug fix in the history of man kind! :) Thanks for the fix!
Author
Owner

@NickeManarin commented on GitHub (Sep 27, 2016):

It was a very silly bug. :D

<!-- gh-comment-id:249756218 --> @NickeManarin commented on GitHub (Sep 27, 2016): It was a very silly bug. :D
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1385
No description provided.