Skip to content

Commit

Permalink
use the ARGB converter if it is explicitly requested or if masks are …
Browse files Browse the repository at this point in the history
…included
  • Loading branch information
trautmane committed Nov 24, 2024
1 parent ce148e3 commit c0113da
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,18 @@ private void renderTile(final String tileId)

final File tileFile = getTileFile(tileSpec);
final BufferedImage bufferedImage;
if (clientParameters.excludeMask) {
// skip conversion step if we don't need to worry about mask
bufferedImage = imageProcessorWithMasks.ip.getBufferedImage();
if ((clientParameters.renderType == RenderType.ARGB) || (! clientParameters.excludeMask)) {
// this incorporates the mask if it exists into the rendered image
bufferedImage = ArgbRenderer.CONVERTER.convertProcessorWithMasksToImage(renderParameters,
imageProcessorWithMasks);
} else if (clientParameters.renderType == RenderType.EIGHT_BIT) {
// this only converts the image processor and ignores the mask
bufferedImage = ByteRenderer.CONVERTER.convertProcessorWithMasksToImage(renderParameters,
imageProcessorWithMasks);
} else if (clientParameters.renderType == RenderType.SIXTEEN_BIT) {
// this only converts the image processor and ignores the mask
bufferedImage = ShortRenderer.CONVERTER.convertProcessorWithMasksToImage(renderParameters,
imageProcessorWithMasks);
} else if (clientParameters.renderType == RenderType.ARGB) {
bufferedImage = ArgbRenderer.CONVERTER.convertProcessorWithMasksToImage(renderParameters,
imageProcessorWithMasks);
} else {
throw new IllegalArgumentException("unsupported render type: " + clientParameters.renderType);
}
Expand Down

0 comments on commit c0113da

Please sign in to comment.