SourceForge has been redesigned. Learn more.
Close

#5 Header before JPEG data

open
nobody
None
5
2008-01-07
2008-01-07
kengoo
No

To generate Flash Lite 1.1 contents, it seems jpeg images need some bytes as header.

Adobe's SWF file format specification document.
(http://www.adobe.com/licensing/developer/)

DefineBitsJPEG2
"Before SWF 8, SWF files could contain an erroneous header of 0xFF, 0xD9, 0xFF, 0xD8 before the JPEG SOI marker."

I am not sure what the "erroneous header" means though.
Practically swf which generated by JGenerator as Flash 4 content is different from swf which published with Flash CS3 as Flash Lite 1.1 content.

dumpd jpeg itself.
0000000 ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 48
0000020 00 48 00 00 ff db 00 43 00 0b 08 08 08 09 08 0c

dumped swf which generated by JGenerator as Flash 4 content
0000000 46 57 53 04 3b 12 00 00 70 00 08 fc 00 00 96 00
0000020 00 0c 01 00 43 02 ff ff ff 7f 05 e6 11 00 00 01
0000040 00 ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00
0000060 48 00 48 00 00 ff db 00 43 00 0b 08 08 08 09 08

dumped swf which published with Flash CS3 as Flash Lite 1.1 content
0000000 46 57 53 04 43 12 00 00 70 00 08 fc 00 00 96 00
0000020 00 0c 01 00 43 02 ff ff ff 7f 05 ea 11 00 00 01
0000040 00 ff d9 ff d8 ff d8 ff e0 00 10 4a 46 49 46 00
0000060 01 01 01 00 48 00 48 00 00 ff db 00 43 00 0b 08

Former case , jpeg image is seen as plain red image on Flash Lite 1.1 player.
Latter case , "ff d9 ff d8" is added before jpeg data starts.
The difference is in the line 0000040.

Fixing com.iv.flash.api.image.JPEGBitmap , this problem seems resolved.
I tested just a few samples and I am just started JAVA.
So this patch might not proper though.

Discussion

  • kengoo

    kengoo - 2008-08-18

    Logged In: YES
    user_id=1975710
    Originator: YES

    File Added: patch.diff

     
  • kengoo

    kengoo - 2008-08-18
     
  • kengoo

    kengoo - 2008-08-18

    Logged In: YES
    user_id=1975710
    Originator: YES

    I found the first diff file had bug. So I fixed it.
    The first one had problem if template file has jpeg(s).

     

Log in to post a comment.