saucecontrol/PhotoSauce

[Feature Request] Managed HEIC Decoder, Keep stream open after use.

iamcarbon opened this issue · 2 comments

The HEIC decoder auto-disposes the stream after use. Existing decoders keep the stream open after use.

We should consider leaving the stream open for consistency or add an overload to allow the stream to be left open and reused for additional operations.

Here's the use case:

 var info = ImageFileInfo.Load(heicStream);
 
 stream.Position = 0; // Object Disposed Exception. Unable to reuse stream

Oof, that should definitely not be assuming ownership of the stream. I'll go ahead and push a new package for that.

New package is up. Thanks for the quick feedback on that!