1
0
mirror of https://codeberg.org/vyivel/dulcepan/ synced 2025-12-24 10:36:49 +02:00

save: use a8b8g8r8 instead of x8b8g8r8

This fixes writing PNG files.
This commit is contained in:
Kirill Primak
2024-06-19 21:16:23 +03:00
parent 1da6068f43
commit dfd6a493e0

View File

@@ -139,7 +139,7 @@ void dp_save(struct dp_state *state) {
pixman_image_set_transform(frame_image, &frame_transform);
pixman_image_t *out_image =
pixman_image_create_bits(PIXMAN_x8b8g8r8, selection->width, selection->height, NULL, 0);
pixman_image_create_bits(PIXMAN_a8b8g8r8, selection->width, selection->height, NULL, 0);
pixman_image_composite32(PIXMAN_OP_SRC, frame_image, NULL, out_image, selection->x,
selection->y, 0, 0, 0, 0, selection->width, selection->height);
pixman_image_unref(frame_image);