Reading/writing JPEG comments
Tim Olson
tim at jump.net
Sat Jan 5 00:24:16 UTC 2002
>Hi,
>
>I was browsing through the new JPEG code, and didn't immediately see a
>way to embed comments or other arbitrary data within a JPEG. I believe
>that the standard supports this; before I dig deeper, I hope someone
>can give me a quick answer.
>From the JFIF spec:
----
APP0 marker used for application-specific information
Additional APP0 marker segments can be used to hold application-specific
information
which does not affect the decodability or displayability of the JFIF
file. Application-
specific APP0 marker segments must appear after the JFIF APP0 and any
JFXX APP0
segments. Decoders should skip any unrecognized application-specific
APP0 segments.
Application-specific APP0 marker segments are identified by a zero
terminated string
which identifies the application (not "JFIF" or "JFXX"). This string
should be an
organization name or company trademark. Generic strings such as dog,
cat, tree, etc.
should not be used.
----
So somehow you need to generate another APP0 segment for your compressed
morph.
-- tim
More information about the Squeak-dev
mailing list
|