Mildly optimize raw image handling

Don't claim an alpha channel when we don't use it.
This commit is contained in:
Přemysl Eric Janouch 2023-05-20 02:12:45 +02:00
parent a6560509d9
commit ac72a72afc
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -1775,7 +1775,7 @@ open_libraw(const char *data, gsize len, GError **error)
int width = image->width, height = image->height;
cairo_surface_t *surface =
cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
cairo_status_t surface_status = cairo_surface_status(surface);
if (surface_status != CAIRO_STATUS_SUCCESS) {
set_error(error, cairo_status_to_string(surface_status));