Available in the LEADTOOLS Imaging toolkit. |
LoadMemory method (Main Control)
Visual Basic
example
Visual C++ 4.0 example
Access 2.0 example
Access 95, 97 example
Visual J++ example
Syntax short LoadMemory (OLE_HANDLE hMem, short iBitsPerPixel, long lPage, long lPages, long iSize);
Overview: Refer to Using Memory-Resident Image Files.
Remarks
Loads an image from a file that is stored in memory. The file can be in any supported image file format and bits per pixel, whether compressed or uncompressed.
For supported formats, refer to Summary of All Supported Image File Formats.
To load an image from a file in memory, use one of the following methods:
LoadMemory—use this for a global handle to the file in memory
LoadArray—use this for a VARIANT byte array that contains the file in memory
LoadBuffer—use this for an address of a memory location that contains the file in memory
To save an image to a memory file, use one of the following methods:
SaveMemory—returns a global handle to a file in memory
SaveArray—returns a VARIANT byte array that contains the file in memory
SaveBuffer—saves a file into a memory location that the user allocates
Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.
To get information about a file stored in memory, refer to the GetMemoryInfo method. To save an image to a file in memory, refer to the SaveMemory method.
Note: You cannot save a multipage file using the SaveMemory method, but if you get a multipage file into memory in some other way, you can use the LoadMemory method to load a specific page from the file.
See Also
Elements: Load method, LoadStamp method, BitmapDataPath property, StartFeedLoad method, LoadInfo event, EnableProgressEvent property, SetLoadResolution method, PCDResolution property
Topics: Raster Images: Loading Files