Share via


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
Gg910986.pubmethod(en-us,AX.60).gif appendData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif appendToFile (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif ascii85Encode (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif base64Encode (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif captureScreen Captures an image from the screen by using the coordinates that are supplied in the parameter list.
Gg910986.pubmethod(en-us,AX.60).gif captureWindow Captures a window as an image, using the handle that is supplied as a parameter.
Gg910986.pubmethod(en-us,AX.60).gif clipboardCopy Copies an image to the clipboard.
Gg910986.pubmethod(en-us,AX.60).gif clipboardPaste Overwrites an existing image with the content of the system clipboard.
Gg910986.pubmethod(en-us,AX.60).gif compressLZ77 (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif copyData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif copyImage Copies the current image object.
Gg910986.pubmethod(en-us,AX.60).gif createImage Creates an empty bitmap image with the width, height, and color depth as specified by the parameters.
Gg910986.pubmethod(en-us,AX.60).gif crop Crops the image.
Gg910986.pubmethod(en-us,AX.60).gif decompressLZ77 (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif displayImage Draws an image with the device context specified by the HDC parameter.
Gg910986.pubmethod(en-us,AX.60).gif displayOrign Enables you to specify an offset (X, Y) from the original origin (0, 0).
Gg910986.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif exportBitmap Gets a handle for the image.
Gg910986.pubmethod(en-us,AX.60).gif finalize (Overrides the finalize Method.)
Gg910986.pubmethod(en-us,AX.60).gif flip Rotates the image 180 degrees in a vertical or horizontal direction.
Gg910986.pubmethod(en-us,AX.60).gif getAsciiData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif getData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif getImageDimensionUnits
Gg910986.pubmethod(en-us,AX.60).gif getPixel Retrieves the ARGB color value of the pixel at the point that is specified by the parameters.
Gg910986.pubmethod(en-us,AX.60).gif getStrData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif getVariant (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif height Retrieves the height of the image in pixels.
Gg910986.pubmethod(en-us,AX.60).gif imageInfo Retrieves the width, height, and color depth of the image.
Gg910986.pubmethod(en-us,AX.60).gif imageSpotlight Produces a spotlight effect within the circle that is defined by radius with center coordinates x and y.
Gg910986.pubmethod(en-us,AX.60).gif importBitmap Clones a bitmap from the image that is specified by the hBitmap parameter.
Gg910986.pubmethod(en-us,AX.60).gif importFileIcon Creates an icon from the file specified by the fileName parameter by copying the icon that is used for the file.
Gg910986.pubmethod(en-us,AX.60).gif 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.
Gg910986.pubmethod(en-us,AX.60).gif loadFile (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif loadImage Loads an image from the file specified by the fileName parameter.
Gg910986.pubmethod(en-us,AX.60).gif loadResource Loads a resource from Ax32.exe.
Gg910986.pubmethod(en-us,AX.60).gif new Initializes a new instance of the BinData class. (Overrides the new Method.)
Gg910986.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif promoteColor Increases the color depth of the image.
Gg910986.pubmethod(en-us,AX.60).gif reduceColorOctree Reduces the color depth of an image.
Gg910986.pubmethod(en-us,AX.60).gif removeImage Removes the data about an image; the object still exists, but has no data.
Gg910986.pubmethod(en-us,AX.60).gif resize Resizes the image to the size that is specified by the newWidth and newHeight parameters.
Gg910986.pubmethod(en-us,AX.60).gif rotate Rotates the image.
Gg910986.pubmethod(en-us,AX.60).gif saveFile (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif saveImage Saves the image to the specified file name.
Gg910986.pubmethod(en-us,AX.60).gif saveType Gets or sets the image decoder.
Gg910986.pubmethod(en-us,AX.60).gif setAsciiData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif setBinaryData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif setData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif setPixel Sets the color for the pixel that is specified by the x and y parameters.
Gg910986.pubmethod(en-us,AX.60).gif setStrData (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif setVariant (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif size (Inherited from BinData.)
Gg910986.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif transparent Sets the transparent color for the image.
Gg910986.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif width Retrieves the width of the image in pixels.
Gg910986.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg910986.pubmethod(en-us,AX.60).gif Gg910986.static(en-us,AX.60).gif ::canLoad Determines whether an image file exists and can be opened.
Gg910986.pubmethod(en-us,AX.60).gif Gg910986.static(en-us,AX.60).gif ::loadExt Retrieves a list of the extensions of the file formats that are supported by the Image class.
Gg910986.pubmethod(en-us,AX.60).gif Gg910986.static(en-us,AX.60).gif ::resourceType Determines whether a particular resource is a bitmap or an icon.
Gg910986.pubmethod(en-us,AX.60).gif Gg910986.static(en-us,AX.60).gif ::rgb Converts an RGB value to an ARGB value.
Gg910986.pubmethod(en-us,AX.60).gif Gg910986.static(en-us,AX.60).gif ::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

See Also

BinData Class