use ARGB_PRE instead of ARGB, becasuse flash uses premultiplied images by default

This commit is contained in:
honfika@gmail.com
2016-05-03 20:31:32 +02:00
parent 356082af72
commit d0fb48dbed
21 changed files with 95 additions and 91 deletions

View File

@@ -1168,7 +1168,7 @@ public class Helper {
int[] imgData;
int type = image.getType();
if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) {
if (type == BufferedImage.TYPE_INT_ARGB_PRE || type == BufferedImage.TYPE_INT_RGB) {
imgData = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
} else {
imgData = image.getRGB(0, 0, width, height, null, 0, width);
@@ -1225,7 +1225,7 @@ public class Helper {
int[] imgData;
int type = image.getType();
if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) {
if (type == BufferedImage.TYPE_INT_ARGB_PRE || type == BufferedImage.TYPE_INT_RGB) {
imgData = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
} else {
imgData = image.getRGB(0, 0, width, height, null, 0, width);