08-18-2008 09:52 AM
Hi,
I would like to create IMAQ images that have a size that is a 512 byte multiple. This in order to do efficient unbuffered disk writes. Is there a way to create such images without copying data?
Is there a description of the IMAQ Image file format (I have a description of the pixel data layout from the IMAQ GetImagePixelPtr.vi help, but this doesn't describe the header layout).
Thanks a lot,
Dixie
08-19-2008 01:54 AM
I am not getting this line.Do you mean that the image size will be 512 bytes?
08-19-2008 01:59 AM
08-22-2008 04:46 PM
You can determine the memory layout of the IMAQ images by looking into the IMAQ Image "control" but that is subject to change, and I do not know if the "header" changes size as the image size changes.
To overcome this issue in our lab, we use the "Image to Array" function to get the pixel data in an i16 array.
We write our own header information (sector aligned) followed by the image data followed by a chunk of "bytes to skip".
If the image is sector-aligned, then the number of bytes to skip is zero and all the image data is contiguous.
If the images are not a multiple of the sector size (4096 bytes in our case) then we write filler data between them.
If the "IMAQ Image" typedef changes, it will not affect us because we are only writing the pixel data (not including any other attributes).
Hope this helps.
08-23-2008 07:28 AM
That is of course a solution for writing the data, but it still involves the Image to Array function that has to copy all the pixel data. I would like to avoid the extra overhead of that copy. I think I have the solution now in a reply from Brent R on another thread I started. Thanks for your suggestions.
Dixie