Saving Images to Database Using MATLAB Database Toolbox


I have some JPEGs/Bmps/PNGs that I need to save to a Microsoft ACCESS database to be shown in Reports.

I cannot successfully save the pictures using fastinsert.  The pictures show up as "Long-Binary Data" in ACCESS, not Bitmap.  If I load the picture into ACCESS using ACCESS, it shows as a Bitmap, but I can't save it right from MATLAB.

I do it like this: I temporarily save the diagrams to the hard drive as .bmp files.  Then I save them to variables in MATLAB using fread, and convert the data to int8 type, and then save them to the database using "fastinsert".  The data in MATLAB look like really long int8 arrays, like [163798x1 int8].  

It seems that they save just a few bytes shy of being complete in the database.  Like, if I load them manually just to compare, the pictures saved via MATLAB are just barely smaller than the pictures saved manually into ACCESS, like maybe 90 bytes smaller in length (like 16000x1 int8 versus 16090x1 int8).  

Any suggestions on how to get ACCESS to recognize them as Bitmaps? 

Also, is it possible to use the "update" function with pictures as well?  PLEASE help me I have to finish this project for my boss by next Tuesday!!!

Thanks a lot!
8/2/2007 5:43:22 PM
comp.soft-sys.matlab 211264 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

0 Replies

Similar Articles

[PageSpeed] 36