Image Class
Provides methods for loading, saving, and manipulating images. If you want to manipulate several images at the same time, use the .
Syntax
class Image extends BinData
Run On
Client
Methods
Method | Description | |
---|---|---|
appendData | (Inherited from BinData.) | |
appendToFile | (Inherited from BinData.) | |
ascii85Encode | (Inherited from BinData.) | |
base64Encode | (Inherited from BinData.) | |
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
captureScreen | Captures an image from the screen by using the coordinates that are supplied in the parameter list. | |
captureWindow | Captures a window as an image, using the handle that is supplied as a parameter. | |
clipboardCopy | Copies an image to the clipboard. | |
clipboardPaste | Overwrites an existing image with the content of the system clipboard. | |
compressLZ77 | (Inherited from BinData.) | |
copyData | (Inherited from BinData.) | |
copyImage | Copies the current image object. | |
createImage | Creates an empty bitmap image with the width, height, and color depth as specified by the parameters. | |
crop | Crops the image. | |
decompressLZ77 | (Inherited from BinData.) | |
displayImage | Draws an image with the device context specified by the HDC parameter. | |
displayOrign | Enables you to specify an offset (X, Y) from the original origin (0, 0). | |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
exportBitmap | Gets a handle for the image. | |
finalize | (Overrides the finalize Method.) | |
flip | Rotates the image 180 degrees in a vertical or horizontal direction. | |
getAsciiData | (Inherited from BinData.) | |
getData | (Inherited from BinData.) | |
getImageDimensionUnits | ||
getPixel | Retrieves the ARGB color value of the pixel at the point that is specified by the parameters. | |
getStrData | (Inherited from BinData.) | |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
getVariant | (Inherited from BinData.) | |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
height | Retrieves the height of the image in pixels. | |
imageInfo | Retrieves the width, height, and color depth of the image. | |
imageSpotlight | Produces a spotlight effect within the circle that is defined by radius with center coordinates x and y. | |
importBitmap | Clones a bitmap from the image that is specified by the hBitmap parameter. | |
importFileIcon | Creates an icon from the file specified by the fileName parameter by copying the icon that is used for the file. | |
importIcon | Retrieves a handle to an icon from an executable file in Microsoft Dynamics AX. The icon is specified by the fileName and iconIdx parameters. | |
loadFile | (Inherited from BinData.) | |
loadImage | Loads an image from the file specified by the fileName parameter. | |
loadResource | Loads a resource from Ax32.exe. | |
new | Initializes a new instance of the BinData class. (Overrides the new Method.) | |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) | |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) | |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) | |
owner | Returns the instance that owns the object. (Inherited from Object.) | |
promoteColor | Increases the color depth of the image. | |
reduceColorOctree | Reduces the color depth of an image. | |
removeImage | Removes the data about an image; the object still exists, but has no data. | |
resize | Resizes the image to the size that is specified by the newWidth and newHeight parameters. | |
rotate | Rotates the image. | |
saveFile | (Inherited from BinData.) | |
saveImage | Saves the image to the specified file name. | |
saveType | Gets or sets the image decoder. | |
setAsciiData | (Inherited from BinData.) | |
setBinaryData | (Inherited from BinData.) | |
setData | (Inherited from BinData.) | |
setPixel | Sets the color for the pixel that is specified by the x and y parameters. | |
setStrData | (Inherited from BinData.) | |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
setVariant | (Inherited from BinData.) | |
size | (Inherited from BinData.) | |
toString | Returns a string that represents the current object. (Inherited from Object.) | |
transparent | Sets the transparent color for the image. | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
wait | Pauses a process. (Inherited from Object.) | |
width | Retrieves the width of the image in pixels. | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) | |
::canLoad | Determines whether an image file exists and can be opened. | |
::loadExt | Retrieves a list of the extensions of the file formats that are supported by the Image class. | |
::resourceType | Determines whether a particular resource is a bitmap or an icon. | |
::rgb | Converts an RGB value to an ARGB value. | |
::validResource | Determines whether the resource specified by the id parameter is valid. |
Top
Remarks
You can construct Image objects from the following file types:
Raster (bitmap) formats - .bmp, .gif, .jpg, .png, .tiff, and .exif
Vector formats - .emf and .wmf
If you want to work with several images at the same time, use the Imagelist class.
You can construct the Image objects from the following file types:
Raster, which is a bitmap, formats - .bmp, .gif, .jpg, .png, .tiff, and .exif
Vector formats - .emf and .wmf
Note
In Microsoft Dynamics AX, the Image class is bound to the client. The class can no longer be run from the server because of the security risks that are associated with file handling.
Examples
The following example prints the height of Picture.jpg in pixels.
Image img = new Image();
img.loadFile(@'C:\MyPictures\Picture.jpg');
print img.height();
pause;
Inheritance Hierarchy
Object Class
BinData Class
Image Class