ImageGear Professional > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Clipboard Functions > IG_clipboard_dimensions |
This function obtains the dimensions of the image currently in the system clipboard.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_clipboard_dimensions ( LPAT_DIMENSION lpWidth, LPAT_DIMENSION lpHeight, LPUINT lpBitsPerPixel ); |
Name | Type | Description |
lpWidth | LPAT_DIMENSION | Far pointer to a variable of type AT_DIMENSION to receive the width in pixels of the image currently in the system clipboard. |
lpHeight | LPAT_DIMENSION | Far pointer to a variable of type AT_DIMENSION to receive the height in rows of the image currently on the system clipboard. |
lpBitsPerPixel | LPUINT | Far pointer to a variable of type UINT to receive the bit depth, in bits per pixel, of the image currently on the system clipboard. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
This function does not process image pixels.
Copy Code
|
|
---|---|
AT_DIMENSION nWidth, nHeight; /* holds the images's width and height */ UINT nBpp; /* holds the bits per pixel */ AT_ERRCOUNT nErrcount; /* holds athe returned error count */ BOOL bPasteAvail; /* TRUE if a pasteable image is on the clipboard */ /* If a pasteable image is on the clipboard, get its dimensions: */ IG_clipboard_paste_available ( &bPasteAvail); if ( bPasteAvail ) { nErrcount = IG_clipboard_dimensions ( &nWidth, &nHeight, &nBpp ); } |
Prior to calling this function you should call IG_clipboard_paste_available_ex(), to verify that there is an image that can be pasted in the system clipboard.