[fpc-pascal] Implementing AggPas with PtcGraph

Nikolay Nikolov nickysn at gmail.com
Sat Jun 3 02:39:34 CEST 2017



On 05/31/2017 02:51 PM, James Richters wrote:
> I was doing some tests with Putpixel and that seems to be a word in the format of RGBA with 4 bits each.    I would think putimage would use the same format, but I haven't tested that yet.
>
> I'm still a bit confused by putimage, since it only has an X and Y startpoint, how do you define the height and width of the bitmap? Getimage() specifies a rectangle, and imagesize() figures out how much memory you need, but I just don't what defines the size and shape of the image to putimage.
The structure, used by putimage is as follows:

3 longints (12 bytes):
- image width
- image height
- reserved

followed by width*height 16-bit words. If you're a using a 16-bit color 
mode (that's the highest supported - it's a limitation of the graph unit 
include files, which ptcgraph reuses from the fpc sources), the color 
format is rgb565.

Nikolay



More information about the fpc-pascal mailing list