mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Add todo for GtkImage bit depth optimization
This commit is contained in:
parent
36e4904c72
commit
8bcf8a6ffa
@ -104,8 +104,10 @@ public class GtkImage : IMemoryImage
|
||||
options ??= new ImageSaveOptions();
|
||||
var type = GetType(imageFormat);
|
||||
var (keys, values) = GetSaveOptions(imageFormat, options.Quality);
|
||||
// TODO: Map to OutputStream directly?
|
||||
// TODO: GDK doesn't support optimizing bit depth (e.g. 1bit/8bit instead of 24bit/32bit) for BMP/PNG/JPEG.
|
||||
// We'd probably need to use libpng/libjpeg etc. directly to fix that.
|
||||
using var helper = PixelFormatHelper.Create(this, options.PixelFormatHint, minFormat: ImagePixelFormat.RGB24);
|
||||
// TODO: Map to OutputStream directly?
|
||||
stream.Write(helper.Image.Pixbuf.SaveToBuffer(type, keys, values));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user