screenshot: improve jpeg very high quality to 91 (enables yuv444 instead of yuv420)

This commit is contained in:
dec05eba
2025-11-16 18:58:57 +01:00
parent 739fd9cd72
commit 80f0e483a4
4 changed files with 2 additions and 30 deletions

View File

@@ -10,23 +10,14 @@ typedef enum {
GSR_IMAGE_FORMAT_PNG
} gsr_image_format;
typedef enum {
GSR_IMAGE_WRITER_SOURCE_OPENGL,
GSR_IMAGE_WRITER_SOURCE_MEMORY
} gsr_image_writer_source;
typedef struct {
gsr_image_writer_source source;
gsr_egl *egl;
int width;
int height;
unsigned int texture;
const void *memory; /* Reference */
} gsr_image_writer;
bool gsr_image_writer_init_opengl(gsr_image_writer *self, gsr_egl *egl, int width, int height);
/* |memory| is taken as a reference. The data is expected to be in rgba8 format (8 bit rgba) */
bool gsr_image_writer_init_memory(gsr_image_writer *self, const void *memory, int width, int height);
void gsr_image_writer_deinit(gsr_image_writer *self);
/* Quality is between 1 and 100 where 100 is the max quality. Quality doesn't apply to lossless formats */