[GH-ISSUE #216] Error with gif and title frame #179

Closed
opened 2026-02-26 09:30:26 +03:00 by kerem · 4 comments
Owner

Originally created by @remyslab on GitHub (Nov 28, 2017).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/216

Version 2.10
Windows 10 64bits
Error with the portable app and the installed app.

I've got an error during the gif creation when I add a Title Frame.

Title frame : title
Arial font
Normal values
Size 40
Black text
100ms delay
Center, center, 0 margin
White background

Error log :
OutOfMemoryException

à System.Drawing.Bitmap.Clone(Rectangle rect, PixelFormat format)
à ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource)
à ScreenToGif.Windows.Other.Encoder.Encode(List`1 listFrames, Int32 id, Parameters param, CancellationTokenSource tokenSource)

System.Drawing.Clone

Thanks,

Originally created by @remyslab on GitHub (Nov 28, 2017). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/216 Version 2.10 Windows 10 64bits Error with the portable app and the installed app. I've got an error during the gif creation when I add a Title Frame. Title frame : title Arial font Normal values Size 40 Black text 100ms delay Center, center, 0 margin White background Error log : OutOfMemoryException ``` à System.Drawing.Bitmap.Clone(Rectangle rect, PixelFormat format) à ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource) à ScreenToGif.Windows.Other.Encoder.Encode(List`1 listFrames, Int32 id, Parameters param, CancellationTokenSource tokenSource) ``` **System.Drawing.Clone** Thanks,
kerem 2026-02-26 09:30:26 +03:00
Author
Owner

@NickeManarin commented on GitHub (Dec 2, 2017):

Thanks for the feedback.

By understanding the log that you gave me, this error happened when analyzing the frames, right before the gif encoding.

This OutOfMemory exception at the Clone() method usually happens if the rectangle is out of bounds. For example, if the frames don't have the same size.

Could you share that project with me? If you have sensitive data, you can create another one, adding the title frame.

<!-- gh-comment-id:348648344 --> @NickeManarin commented on GitHub (Dec 2, 2017): Thanks for the feedback. By understanding the log that you gave me, this error happened when analyzing the frames, right before the gif encoding. This OutOfMemory exception at the Clone() method usually happens if the rectangle is out of bounds. For example, if the frames don't have the same size. Could you share that project with me? If you have sensitive data, you can create another one, adding the title frame.
Author
Owner

@remyslab commented on GitHub (Dec 2, 2017):

@NickeManarin
I found something. This bug appears only when you down-scale dpi (to 72 in my case), and after you will add a title frame.
But if you add first the title frame, and you down-scale to 72 dpi, it's ok.

<!-- gh-comment-id:348678003 --> @remyslab commented on GitHub (Dec 2, 2017): @NickeManarin I found something. This bug appears only when you down-scale dpi (to 72 in my case), and after you will add a title frame. But if you add first the title frame, and you down-scale to 72 dpi, it's ok.
Author
Owner

@NickeManarin commented on GitHub (Dec 4, 2017):

Oh, ok. The title frame isn't respecting the current dpi of the project. Thanks.

<!-- gh-comment-id:348831969 --> @NickeManarin commented on GitHub (Dec 4, 2017): Oh, ok. The title frame isn't respecting the current dpi of the project. Thanks.
Author
Owner

@NickeManarin commented on GitHub (Jan 10, 2018):

With v2.11 I can't reproduce this bug. I did some changes with the previewer, so I guess it was fixed.

<!-- gh-comment-id:356649065 --> @NickeManarin commented on GitHub (Jan 10, 2018): With v2.11 I can't reproduce this bug. I did some changes with the previewer, so I guess it was fixed.
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#179
No description provided.