Some colors are missing in every GIF rendered through the Layer Class.
The second argument of the write method defines the image quality:
Therefore, the correct code is as follows:
layer.write(imageBean.getImageType() , 256, cqResponse.getOutputStream());
This issue occurs when the number of colors is set to eight instead of 256, in the Layer.write() method:
layer.write(imageBean.getImageType() , 8, cqResponse.getOutputStream());
Sign in to your account