Image.width Method

Retrieves the width of the image in pixels.

Syntax

public int width()

Run On

Client

Return Value

Type: int
An integer that represents the width of the image in pixels.

Examples

The following example prints out the width of the image in the test.bmp file.

Image img = new Image(); 
  
img.loadFile(@'C:\test.bmp'); 
print img.width(); 
pause;

See Also

Image Class

Image.height Method

Image.imageInfo Method