From 42a6916b324062c56818506391960b7e189a124f Mon Sep 17 00:00:00 2001 From: Heiko Klare Date: Sat, 15 Feb 2025 08:52:19 +0100 Subject: [PATCH] Revert change of Image surface color type from 24 to 32 bit In a previous change (5c2611d), the case distinction in creation of an image's surface depending on using GTK 4 or not has been removed. By accident, this change replaced the previously used 24 bit color format (for both cases) with a 32 bit color format. This change revert that accidental modification. --- .../Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java index e518cfda153..58cc992d0f0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java @@ -1260,7 +1260,7 @@ void init(int width, int height) { this.type = SWT.BITMAP; /* Create the pixmap */ - surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height); + surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_RGB24, width, height); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); // When we create a blank image we need to set it to 100 in GTK3 as we draw using 100% scale. // Cairo will take care of scaling for us when image needs to be scaled.