swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Re: data loss in jpeg


From: Andrew Wheatley
Subject: [Swftools-common] Re: data loss in jpeg
Date: Wed, 22 Sep 2004 13:08:31 -0400 (EDT)

Here's how to do a straight copy of a jpeg into a swf
without any data loss.
There are two streams.  According to the swf documentation,
each stream is surronded by a 0xff 0xd8 and a 0xff 0xd9.
Make the first stream empty, that is, just write
0xff 0xd8 0xff 0xd9.
Start the second stream with 0xff 0xd8, copy all the data
from the jpg file into the buffer and then end it with
0xff 0xd9.
--------------------------
Andrew Wheatley
Director of Special Projects
Demologic: An Idologic Incorporated Company
http://www.demologic.com/index.html
1-866-DO-LOGIC (1-866-365-6442) ext. 101
address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]