-
Task
-
Resolution: Fixed
-
Critical
-
2.2.3, 2.2.4
-
-
Empty show more show less
-
Empty show more show less
Currently we do image type assignment at least on two places:
info.magnolia.imaging.operations.load.AbstractLoader.apply(BufferedImage, P) { ... int imageType = loaded.getType(); // set the output image type to the source image type if (imageType == BufferedImage.TYPE_CUSTOM) { // if the source image type is not set... if (loaded.getAlphaRaster() != null) { // with alpha channel imageType = BufferedImage.TYPE_INT_ARGB_PRE; } else { // without alpha channel imageType = BufferedImage.TYPE_INT_RGB; } } ... }
info.magnolia.imaging.operations.cropresize.resizers.MultiStepResizer.resize(BufferedImage, Coords, Size) { ... final int type = (src.getTransparency() == Transparency.OPAQUE) ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB; ... }
This two assignments should be in sync (e.g. create info.magnolia.imaging.util.ImageUtil.getImageType(BufferedImage)).
A part of this function could be also fix for loosing transparency of an indexed transparent image, see SUPPORT-3443.
Acceptance criteria
- clones
-
MGNLIMG-131 Revise image type assignments
- Closed