DisplayFromByteArrayICM Method

See Also     Examples     Applies To

Displays an image or a PDF from a file stored within an array of bytes using embedded color management (ICM).

Syntax

object.DisplayFromByteArrayICM (*arBytes())

The DisplayFromByteArrayICM syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
*arBytes() Required. Input 1D Byte Array. The array wich contains image file data.

Returns

Long. GdPictureStatus

Remarks

The GdPictureStatus constants are defined HERE
Supported image formats are PDF, BMP, DIB, RLE, ICO, EMF, WMF, GIF, ANIMATED GIF, JPEG, JPG, JPE, JFIF, PNG, TIFF, MULTIPAGE TIFF, PNM, PPM, PBM, PGM, RPPM, RPGM, RPBM, PCX.
Redistributing the optional gdimgplug.dll library you will also be able to read XPM, XBM, WBMP, TGA, SGI, Sun RAS, PSD, MNG, Kodak PhotoCD files, KOALA files, JP2, J2K, JNG, JBIG, IFF, HDR, Raw Fax G3, EXR, DDS and Dr. Halo files.

Visual Basic Sample

How to display an image from an array of bytes.


Dim nPtFile As Integer
Dim arBuffer() As Byte

nPtFile = FreeFile
Open "myimage.tif" For Binary As #nPtFile
ReDim arBuffer((LOF(nPtFile)))
Get #nPtFile, , arBuffer
Close #nPtFile

Call object.DisplayFromByteArrayICM(arBuffer)
Erase arBuffer






© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.