• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: SQLite/MySQL BLOB-creator application needed.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: SQLite/MySQL BLOB-creator application needed.


  • Subject: RE: SQLite/MySQL BLOB-creator application needed.
  • From: Kirk Kerekes <email@hidden>
  • Date: Thu, 28 May 2009 12:14:46 -0500

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 (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Re: performSelectorOnMainThread problem SOLVED
  • Next by Date: Re: Triggering change notifications when modifying custom object ivars in core data app
  • Previous by thread: SQLite/MySQL BLOB-creator application needed.
  • Next by thread: How to make our application as default for particular type of file.
  • Index(es):
    • Date
    • Thread