Skip to content

Encoding an animated image requires all frames to be loaded into memory, can lead to OutOfMemoryExceptions #222

@MaryMajesty

Description

@MaryMajesty

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

When creating an animated image, all frames in the image have to be completely loaded into memory. If you need lots of frames at a high resolution, this can quickly exhaust the available memory.

Possible Solution

Creating the possibility for providing streams for the frames instead of completely loading them into memory would decrease the memory required. These streams could contain raw pixel data or encoded images. Using this feature, you could save the frames to the disk thus freeing the memory they take up, and pass FileStreams for each frame to the image.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions