mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 19:20:45 +00:00
use ARGB_PRE instead of ARGB, becasuse flash uses premultiplied images by default
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -65,7 +65,7 @@ public class SerializableImage implements Serializable {
|
||||
}
|
||||
|
||||
public SerializableImage(int width, int height, int imageType, int[] pixels) {
|
||||
if (imageType != BufferedImage.TYPE_INT_ARGB && imageType != BufferedImage.TYPE_INT_RGB) {
|
||||
if (imageType != BufferedImage.TYPE_INT_ARGB_PRE && imageType != BufferedImage.TYPE_INT_RGB) {
|
||||
throw new Error("Unsuppported image type: " + imageType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user