09-18-2008 04:34 PM
I have an application that has been running for some time now and a lot of acquisitions have been done with it. During one acquisition, I get roughly 1000 images that I save on disk in a JPG format. We are now moving the data storage to a centralized location in a database and I want to do the following:
1 - Insert the raw bytes of the JPG file in the DB
2 - Insert new LabVIEW images in the DB, compressed in a JPG format
3 - Load and display images saved in the JPG compressed format in the DB
Element 1 is really easy to do and I am already doing it. For elements 2 and 3 though, I can't seem to find a way to skip writing/reading to disk. I know how to use the "Write to JPG" VI for example but that slows down the process a lot because of disk access. It would be much faster if the data could be uncompressed directly to/from the memory.
Is there a way to use LabVIEW VIs to compress the image into a JPEG format and return a byte array instead of writing a JPG file on disk? Also, I would need to be able to do the opposite as well (i.e. pass an array of raw bytes representing the content of a regular JPG file and get a LabVIEW image out of it)
Thanx!
Olivier
09-18-2008 04:48 PM
09-18-2008 05:27 PM
It is an option, but the compression factor of the JPG file format makes it a more suitable solution in the long run. The imaegs could be compressed differently since I'm saving binary data anyways but because I already have all those JPG file, I would like to stick with that.
Also, I know that the compression algorythm exist somewhere, it's just a matter of whether we can access it or not.
09-22-2008 05:40 AM