Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : Image phrase
 

Image phrase

Specifies the file in which an image is stored and the dimensions of the image.
Note: Does not apply to SpeedScript programming.

Syntax

FILE name
[{ IMAGE-SIZE | IMAGE-SIZE-CHARS | IMAGE-SIZE-PIXELS }
width BY height
]
[ FROM { X n Y n | ROW n COLUMN n }]
{ IMAGE-SIZE | IMAGE-SIZE-CHARS | IMAGE-SIZE-PIXELS }
width BY height
[ FROM { X n Y n | ROW n COLUMN n }]
FILE name
A character expression that specifies the name of an operating system file that contains an image. If you do not specify a full pathname, ABL searches your PROPATH for the file. If you do not supply a suffix, ABL searches for files with the extension .bmp, .ico, or .cur in Windows. The image contained within the file must be in a format that is appropriate for the target platform. The file is not read until the image is displayed. The filename can contain Unicode characters. See OpenEdge Development: Internationalizing Applications for more information about Unicode.
[ IMAGE-SIZE | IMAGE-SIZE-CHARS ]
Specifies that the unit of measure when reading the image is characters.
IMAGE-SIZE-PIXELS
Specifies that the unit of measure when reading the image is pixels.
width
Specifies the width of the image. The value width must be an integer constant. If the image is larger than the size you specify, the AVM crops the image to the specified size.
height
Specifies the height of the image. The value height must be an integer constant. If the image is larger than the size you specify, the AVM crops the image to the specified size.
FROM { X n Y n | ROW n COL n }
Two integer constants (n) that specify the offset inside the image file where the AVM starts reading the image. If you specify X and Y, the offset is measured in pixels; if you specify ROW and COL, the offset is measured in characters.

Example

See the DEFINE IMAGE statement reference entry for an example.

Notes

*Use one of the image size options in conjunction with the FILE option to make a compile-time association between the image file and the image widget; the image file does not have to exist at this point.
*Use one of the image size options without the FILE option to create an image widget that is not associated with an image file at compile time. You can then make the association at run time.
*Use the FILE option without one of the image size options if you do not know the size of the image and want ABL to determine the size at compile time. If you do this, ABL uses the entire image. Also note that the image file must exist or a compiler error will occur.
*In Windows, you can specify a URL pathname. If you do not specify a fully-qualified URL, ABL searches in the PROPATH for the file. Valid URL protocols include HTTP and HTTPS.
Note: URL pathnames cannot contain the percent symbol (%). If an error exists in a URL specified on the PROPATH, ABL continues searching with the next PROPATH entry.
*The following table lists the image file formats that are currently supported for use on button and image widgets.
Table 43. Supported image file types
File extension
Image file type
.bmp
Windows bitmap
.cal
Computer-aided Acquisition and Logistics Support
.clp
Microsoft Windows Clipboard
.cut
Halo CUT
.dcx
Intel FAX format
.dib
Windows device-independent bitmap
.eps
Encapsulated PostScript
.gif1
Graphics Interchange Format
.ica
IBM IOCA
.ico
Microsoft Icon File format
.iff
Amiga IFF
.img
GEM bitmap
.jbig
Joint Bi-level Image Experts Group
.jpg
JPEG
.lv
LaserView
.mac
Macintosh MacPaint
.msp
Microsoft Windows Paint
.pcd
Kodak Photo CD
.pct
Macintosh PICT
.pcx
PC Paintbrush
.png
GIF (Graphics Interchange Format) replacement
.psd
Adobe Photoshop
.ras
Sun Raster (1-, 8-, 24-, or 32-bit Standard, BGR, RGB, and byte encoded)
.tga
TARGA
.tif
Tag image file format
.wbmp
Windows bitmap for wireless devices
.wpg
WordPerfect graphics
.xbm (also .bm)
X bitmap
.xpm
Pixmap
.xwd
UNIX X Window Dump File format

1 Animation in .gif files is not supported.

See also

DEFINE BUTTON statement, DEFINE IMAGE statement, FORM statement