Re: [sqlite] Writing an image to the database as a BLOB

2008-08-30 Thread Teg
Hello Dave, Saturday, August 30, 2008, 4:52:26 AM, you wrote: DD> You ought to think very carefully before storing anything resembling DD> raw hbitmap data into your database. You will be embedding obscure DD> dependencies on windows (vs macos or unix), arcane hardware requirements DD> such as

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-30 Thread Dave Dyer
You ought to think very carefully before storing anything resembling raw hbitmap data into your database. You will be embedding obscure dependencies on windows (vs macos or unix), arcane hardware requirements such as row lengths being a multiple of 16 or 32 bytes, or whether the rows are scanned

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread David Bicking
Have you confirmed that the pBuffer that would read out is byte for byte the same as the bmBytes that you used to insert in to the database? If they are the same, then sqlite did its job (or rather you called it correctly...), and the trouble is somewhere else. David On Fri, 2008-08-29 at 14:13

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread Jared Miller
Yes I am able to do that. I fill out the BITMAPFILEHEADER and BITMAPINFOHEADER information for the image, and then I do this: bmpFile.Write(, sizeof(BITMAPFILEHEADER)); bmpFile.Write(, sizeof(BITMAPINFOHEADER)); bmpFile.Write(pbyBitmap, size); //pbyBitmap is the actual byte data This has

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread Jeffrey Becker
Are you able to load and save the bitmap to a file? On Fri, Aug 29, 2008 at 2:13 PM, Jared Miller <[EMAIL PROTECTED]> wrote: > Hello, > > I am having trouble figuring out how to successfully write an image to the > SQLite database as a Blob, using C++. > > I have an HBITMAP that I would like to

[sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread Jared Miller
Hello, I am having trouble figuring out how to successfully write an image to the SQLite database as a Blob, using C++. I have an HBITMAP that I would like to be able to store to and retrieve from the DB. If I understand what I have read correctly, I am supposed to write out the actual byte