thumbnailator
thumbnailator copied to clipboard
Wrong color pictures

Thumbnails.of("d:/o.jpg") .sourceRegion(0,0,800,800) .size(750,750) .keepAspectRatio(false) .toFile("d:/n.jpg");

same problem
me too
I think is the same problem #80, @panenming @wishdusk did you find any solution for this problem?
Same issue. Any update? Is this project still alive?
+1
in jdk6 miss same issue, see problem #5,want we use TwelveMonkeys solve a specific JPEG image problem
I had the same problem and found using this function before writing fixed my issue :
public BufferedImage imageRemoveAlphaChannel(BufferedImage thumbnail) {
// effectively convert _ARGB to _RGB, i.e. remove alpha / opacity channel
BufferedImage newImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
int[] rgb = thumbnail.getRGB(0, 0, width, height, null, 0, width);
newImage.setRGB(0, 0, width, height, rgb, 0, width);
thumbnail = newImage;
return thumbnail;
}
i therefore think calling this method when .imageType(BufferedImage.TYPE_INT_RGB) is called on an image pipeline started with an image with BufferedImage.TYPE_INT_ARGB would fix the problem in a generic way.
I really like this library's builder-style interface compared to the terrible experience coding against ImageIO and Graphics2D directly (for scaling and rotating) but the colour-changing almost drove me to drop use of this library.
same problem...