diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index 8570680b5..f2adb51a9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -2289,6 +2289,8 @@ public class SWFInputStream extends InputStream { public MORPHGRADIENT readMORPHGRADIENT() throws IOException { MORPHGRADIENT ret = new MORPHGRADIENT(); int numGradients = (int) readUI8(); + ret.numGradientsExtra = numGradients & 0xf0; //some extra data. Are these the same as in GRADIENT or just obfuscator junk??? + numGradients = numGradients & 0x0f; ret.gradientRecords = new MORPHGRADRECORD[numGradients]; for (int i = 0; i < numGradients; i++) { ret.gradientRecords[i] = readMORPHGRADRECORD(); diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java index 3073d43e9..7bd982568 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -1471,7 +1471,7 @@ public class SWFOutputStream extends OutputStream { * @throws IOException */ public void writeMORPHGRADIENT(MORPHGRADIENT value, int shapeNum) throws IOException { - writeUI8(value.gradientRecords.length); + writeUI8(value.gradientRecords.length + value.numGradientsExtra); for (int i = 0; i < value.gradientRecords.length; i++) { writeMORPHGRADRECORD(value.gradientRecords[i]); } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java index 594ce375f..b01af9eb0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java @@ -24,6 +24,7 @@ public class MORPHGRADIENT { public int numGradients; public MORPHGRADRECORD gradientRecords[]; + public int numGradientsExtra; public static RGBA morphColor(RGBA c1, RGBA c2, int ratio) { int r = (c1.red + (c2.red - c1.red) * ratio / 65535);