gwlucastrig commented on a change in pull request #106:
URL: https://github.com/apache/commons-imaging/pull/106#discussion_r522425038
##########
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 think that sRGB is the default for Java and would give us the best
performance. I can double check this.
----------------------------------------------------------------
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]