mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-25 04:15:36 +00:00
Issue #328 Bugged replacing DefineBitsJPEG3/4Tag image
This commit is contained in:
@@ -52,15 +52,8 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag {
|
||||
byte ba[] = new byte[image.getWidth() * image.getHeight()];
|
||||
for (int i = 0; i < ba.length; i++) {
|
||||
ba[i] = (byte) 255;
|
||||
}
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
SWFOutputStream sos = new SWFOutputStream(baos, SWF.DEFAULT_VERSION);
|
||||
try {
|
||||
sos.writeBytesZlib(ba);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(DefineBitsJPEG3Tag.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
bitmapAlphaData = baos.toByteArray();
|
||||
}
|
||||
bitmapAlphaData = ba;
|
||||
} else {
|
||||
bitmapAlphaData = new byte[0];
|
||||
}
|
||||
|
||||
@@ -68,14 +68,7 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag {
|
||||
for (int i = 0; i < ba.length; i++) {
|
||||
ba[i] = (byte) 255;
|
||||
}
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
SWFOutputStream sos = new SWFOutputStream(baos, SWF.DEFAULT_VERSION);
|
||||
try {
|
||||
sos.writeBytesZlib(ba);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(DefineBitsJPEG4Tag.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
bitmapAlphaData = baos.toByteArray();
|
||||
bitmapAlphaData = ba;
|
||||
} else {
|
||||
bitmapAlphaData = new byte[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user