Skip to content

WebP images turn green #221

@filex88

Description

@filex88

Expected behavior

response-tree

Actual behavior

response-green

Steps to reproduce the behavior

my code is:

Thumbnails.of(new ByteArrayInputStream(originalBytes))
					.size(targetWidth, targetHeight)
					.outputFormat("JPEG")
					.outputQuality(outputQuality)
					.scalingMode(ScalingMode.PROGRESSIVE_BILINEAR)
					.antialiasing(Antialiasing.ON)
					.useExifOrientation(true)
					.toOutputStream(outputStream);

i have also tried to set:

imageType(BufferedImage.TYPE_INT_ARGB)

or

imageType(BufferedImage.TYPE_INT_RGB)

and i already have ImageIO plugins imageio-core, imageio-jpeg, imageio-tiff, imageio-webp in my pom.

If I transform the image using other online tools before using it everything seems to work as it should.

The bug only appears with some webps and seems to be present also using other java image manipulation libraries that rely on ImageIO.

Environment

  • OS vendor and version: Mac
  • JDK vendor and version: 1.8
  • Thumbnailator version: 0.4.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions