Re: Attaching data to image files
Re: Attaching data to image files
- Subject: Re: Attaching data to image files
- From: David Remahl <email@hidden>
- Date: Sat, 12 Apr 2003 02:36:54 +0200
Check out this section in the PNG spec:
<
http://www.w3.org/TR/PNG-Encoders.html#E.Use-of-private-chunks>
You can use your own chunks to store auxiliary data in the image itself.
Another method would be to use the resource fork of the image to store
the information. Resource forks are deprecated, though, and will not
survive for example being stuffed into a .tar.gz archive and many other
non-mac things. A third alternative is to create a file package and
pack the image and the plist into an opaque container (look at RTFD's
or Keynote files for examples of that). It depends on what the image is
to be used as wether it is appropriate in your case.
/ Rgds, David Remahl
On Saturday, April 12, 2003, at 01:50 AM, Jan Van Tol wrote:
List,
As part of the caching mechanism in my app, I need to be able to
associate data with image files (PNG in this case). Right now I am
storing it in separate plist files, but soon I will have many more
files to manage, and it could become a little bit unwieldy. Is there
a way to embed data (basically a couple of strings) directly in the
image file? Would this be the best way to manage my situation, or
would separate files be the best way to go?
Thanks in advance,
-Jan Van Tol
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.