So I need a simple OS X application (either an existing desktop
application, or a simple command-line application) that can serialize
a PNG image
into a BLOB (keeping all metadata, etc.) for access by a SQLite (or
any SQL-type DB) engine (used within a Cocoa/iPhone application).

AFAIK a SQLite3 BLOB is just the -bytes of an NSData. So if your PNG is a file, read it into an NSData instance and then use SQLite BLOB operations to insert the [data bytes] into the row. If your PNG is in memory, it is presumably either an NSImage (where it has largely lost its original PNG-nature) or it is an NSData already.

I'm not sure which "metadata" you want to preserve -- you probably ought to be more specific.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to