Index

Package: LoadPNG

Description

package LoadPNG is

Subprograms & Entries

LoadPNG_Version

function LoadPNG_Version return String;

References:

loadpng.ads:10:14 (declaration)
applications.adb:289:56 (reference)
loadpng.adb:6:14 (body)
loadpng.adb:9:9 (label)
loadpng.ads:11:27 (reference)

Called by:

Applications.Init defined at applications.ads:113:14

Set_PNG_Screen_Gamma

procedure Set_PNG_Screen_Gamma
( gamma: Long_Float );

References:

loadpng.ads:24:15 (declaration)
loadpng.adb:13:15 (body)
loadpng.adb:18:9 (label)
png_screen_gamma is slightly overloaded (sorry): A value of 0.0 means: Don't do any gamma correction in load_png() and load_memory_png(). This meaning was introduced in v1.4. A value of -1.0 means: Use the value from the environment variable SCREEN_GAMMA (if available), otherwise fallback to a value of 2.2 (a good guess for PC monitors, and the value for sRGB colourspace). This is the default. Otherwise, the value of png_screen_gamma is taken as-is.

Set_PNG_Compression_Level

procedure Set_PNG_Compression_Level
( level: Integer );

References:

loadpng.ads:28:15 (declaration)
loadpng.adb:22:15 (body)
loadpng.adb:27:9 (label)
Choose zlib compression level for saving file. Default is Z_BEST_COMPRESSION.

Load_PNG

function Load_PNG
( filename: String;
pal: A_RGB )
return A_Bitmap;

References:

loadpng.ads:31:14 (declaration)
loadpng.adb:31:14 (body)
loadpng.adb:36:9 (label)

Calls:

LoadPNG.Load_PNG.C_Load_PNG defined at loadpng.adb:32:18
To_C defined at i-c.ads:84:13
Load a PNG from disk.

Load_PNG_Pf

function Load_PNG_Pf
( fp: not null A_Packfile;
pal: A_RGB )
return A_Bitmap;

References:

loadpng.ads:35:14 (declaration)
loadpng.ads:64:23 (body)
Load a PNG from some place.

Load_Memory_PNG

function Load_Memory_PNG
( buffer: Address;
buffer_size: Natural;
pal: A_RGB )
return A_Bitmap;

References:

loadpng.ads:38:14 (declaration)
resources-images.adb:54:16 (reference)
loadpng.ads:65:23 (body)

Called by:

Resources.Images.Load_PNG defined at resources-images.adb:51:14
Load a PNG from memory.

Save_PNG

function Save_PNG
( filename: String;
bmp: A_Bitmap;
pal: A_RGB )
return Integer;

References:

loadpng.ads:43:14 (declaration)
loadpng.adb:40:14 (body)
loadpng.adb:45:9 (label)

Calls:

LoadPNG.Save_PNG.C_Save_PNG defined at loadpng.adb:41:18
To_C defined at i-c.ads:84:13
Save a bitmap to disk in PNG format.

Register_PNG_File_Type

procedure Register_PNG_File_Type;

References:

loadpng.ads:48:15 (declaration)
loadpng.ads:66:23 (body)
Adds `PNG' to Allegro's internal file type table. You can then just use load_bitmap and save_bitmap as usual.

Register_PNG_Datafile_Object

procedure Register_PNG_Datafile_Object
( id: AL_ID );

References:

loadpng.ads:53:15 (declaration)
loadpng.ads:67:23 (body)
Register an datafile type ID with Allegro, so that when an object with that type ID is encountered while loading a datafile, that object will be loaded as a PNG file.

LoadPNG_Init

function LoadPNG_Init return Integer;

References:

loadpng.ads:60:14 (declaration)
loadpng.ads:68:23 (body)
This is supposed to resemble jpgalleg_init in JPGalleg 2.0, just in case you are lazier than lazy. It contains these 3 lines of code: register_png_datafile_object(DAT_ID('P','N','G',' ')); register_png_file_type(); return 0;