GET_DIB_BLOCK@

Platform

Win32, x64

Purpose

To read a BMP or JPEG format file into a character array.

Syntax

 SUBROUTINE GET_DIB_BLOCK@( FILENAME, PARRAY, AW, AH, ADX,
+  ADY, W, H, DX, DY, ERCODE )
 CHARACTER(*) FILENAME
 CHARACTER PARRAY(3,AW,AH)
 INTEGER AW,AH,ADX,ADY,W,H,DX,DY,ERCODE

Description

All of the arguments are input values except for PARRAY which contains the returned data and ERCODE which returns the error status.

FILENAME is the name of the BMP file.

AW and AH are dimensions of PARRAY.

ADX and ADY are offsets used when writing the data to PARRAY.

W and H are the width and height of the image data to be copied.

DX and DY are offsets used when reading the data from the file.

The first dimension of PARRAY is used to store the red, green and blue values for each pixel. ERCODE will return:

 

0

SUCCESS

 

2

READ ERROR

 

4

MEMORY ERROR

 

5

NOT A BMP FILE

 

10

BAD FILE

 

13

BAD NUMBER

 

16

OTHER ERROR

 

For JPEG data the file name must have a .jpg or .jpeg extension.

A wider range of files can be loaded after a call to USE_GDIPLUS_IMAGE_FILES@.

See also

GET_DIB_SIZE@, PUT_DIB_BLOCK@, DIB_PAINT@

Example

See Drawing device independent bitmaps.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited