Exemplo n.º 1
0
        public ClipActionRecord(SwfStream stream)
        {
            EventFlags = stream.ReadClipEventFlags();
            if (EventFlags == ClipEventFlags.None) return;

            uint size = stream.ReadUInt();
            if ((EventFlags & ClipEventFlags.KeyPress) != 0) KeyCode = new KeyCode(stream.ReadByte());

            Actions = ActionRecord.ReadActions(stream, size);
        }
Exemplo n.º 2
0
        protected void Load(SwfStream stream, uint length, bool hasDeblock)
        {
            CharacterID = stream.ReadUShort();
            uint alpha = stream.ReadUInt();
            Deblock = hasDeblock ? (ushort?)stream.ReadUShort() : null;
            byte[] data = stream.ReadByteArray(length - 6);

            ImageData = new byte[alpha];
            Array.Copy(data, 0, ImageData, 0, (int)alpha);
            Format = BitmapUtils.DetectFormat(ImageData);
            if (Format == BitmapFormat.Jpeg)
                ImageData = BitmapUtils.RepairJpegMarkers(ImageData);

            CompressedAlpha = new byte[data.Length - alpha];
            if (CompressedAlpha.Length > 0)
                Array.Copy(data, (int)alpha, CompressedAlpha, 0, CompressedAlpha.Length);
        }
Exemplo n.º 3
0
 public void Load(SwfStream stream, uint length, byte version)
 {
     CharacterID = stream.ReadUShort();
     stream.ReadUInt();
     Data = stream.ReadByteArray(length - 6);
 }