Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > AUI > AUI_IMAGE

Retrieve Information

Scroll Prev Top Next More

xcall AUI, AUI_IMAGE, IMGOP_INFO, handle, status, imginfo {,filespec}

MAP1 IMGINFO              ! Image info packet

MAP2 IMG'OWIDTH,F     ! Original image width (pixels)

MAP2 IMG'OLENGTH,F    ! Original image length (pixels)

MAP2 IMG'DWIDTH,F     ! Display width (pixels)

MAP2 IMG'DLENGTH,F    ! Display length (pixels)

MAP2 IMG'BPP,F        ! Bits per pixel

MAP2 IMG'NA,F         ! not used

MAP2 IMG'TYPE,B,2     ! type: 1=tif,2=bmp,3=jpg,4=pcx,5=tga,6=gif,7=png

MAP2 IMG'BW'BLKPCT,F  ! % black pixels (B&W TIF only)

 

IMGOP_INFO retrieves some information about a previously opened image (by specifying the image handle), or from the disk file filespec. The information is reasonably self-explanatory. Note that the operation can also be used merely to verify if a particular handle value is valid.

We may be adding fields to this structure in the future to accommodate additional pieces of information that developers discover a need for. The routine will however always be smart enough to look at the size of the packet you pass so as to not overrun the packet if new fields are added but not yet mapped in existing programs.

History

2016 April, A-Shell 6.3.1512:  The IMGOP_INFO opcode now returns the percent black for B&W TIF images. The calculation eliminates some noise (individual floating bits) and also ignores an outer margin equal to 1/40th of the width and/or length, and may be useful as a way of detecting blank (or perhaps too-light or too-dark) pages during scanning.

2006 April, A-Shell 4.9.955:  Add support for the filespec parameter.