kinow commented on a change in pull request #106:
URL: https://github.com/apache/commons-imaging/pull/106#discussion_r522428395



##########
File path: src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
##########
@@ -242,16 +266,29 @@ private BufferedImage makeBufferedImage(
         WritableRaster raster;
         final DataBufferInt buffer = new DataBufferInt(argb, w * h);
         if (useAlpha) {
-            colorModel = new DirectColorModel(32, 0x00ff0000, 0x0000ff00,
-                    0x000000ff, 0xff000000);
-            raster = Raster.createPackedRaster(buffer, w, h,
-                    w, new int[]{0x00ff0000, 0x0000ff00, 0x000000ff,
-                            0xff000000}, null);
+            colorModel = new DirectColorModel(
+                    ColorSpace.getInstance(ColorSpace.CS_sRGB),

Review comment:
       I normally default to RGB, but for no special reason. I think sRGB is 
some standard related to RGB, but I can't really remember ever setting a file 
to be saved as sRGB :thinking: so asking more out of curiosity. If this needs 
changing later, it wouldn't break binary backward compatibility, so we can fix 
it even after 1.0 release (if necessary)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to