ImageMan DLL Suite Version 8Submit feedback on this topic   

Loading Images from Memory

Sometimes it's not practical or even possible to load an image from disk. For instance, imagine an employee database which uses a variable-length field for storing a JPEG photograph of each employee. Your database API provides no method of getting the exact offset and length of each photograph for use with ImgOpenEmbedded, but there is a way to load the field containing the photo into a memory block.

 

The ImgOpenMem function is designed for just this situation. ImgOpenMem loads an image from a memory block which contains a valid image format; i.e., a valid TIFF, JPEG, GIF, PCX, or any of the many formats supported by ImageMan. Your application need only call ImgOpenMem, passing in the memory block which contains the image, and ImageMan will return a valid image handle, just as if the image had been opened using ImgOpenSolo.

 

To make it easy to write those photographs to a memory block in the first place, we've also provided the ImgXBeginWriteMem and ImgXEndWriteMem functions; these functions are documented in the section dealing with image export.

 

 

 


© 1995-2004 Data Techniques, Inc. All rights reserved.