graphics/ png.bi | |
License | Copyright © 2009, FreeBASIC Extended Library Development Group |
ext. gfx.png | |
Enumerations | |
target_e | Contains the valid destinations/locations for the png image. |
Functions | |
load | Loads a png file. |
load_mem | Loads a png file that has been located in memory. |
save | Saves a png image from a memory buffer. |
dimensions | Gets the dimensions of a png image without loading it. |
dimensions_mem | Gets the dimensions of a png file loaded in memory. |
Copyright © 2009, FreeBASIC Extended Library Development Group
Contains code contributed and copyright © 2007 yetifoot
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License
Enumerations | |
target_e | Contains the valid destinations/locations for the png image. |
Functions | |
load | Loads a png file. |
load_mem | Loads a png file that has been located in memory. |
save | Saves a png image from a memory buffer. |
dimensions | Gets the dimensions of a png image without loading it. |
dimensions_mem | Gets the dimensions of a png file loaded in memory. |
declare function load cdecl alias "png_load" ( byref filename as const string, byval target as target_e = TARGET_FBNEW ) as any ptr
Loads a png file.
filename | the png image to load. |
target | (optional) the target from target_e to load to, defaults to New FB style Image buffer |
Pointer to png image in memory.
When destroying an image created with TARGET_OPENGL you must use deallocate, not imagedestroy.
declare function load_mem cdecl alias "png_load_mem" ( byval buffer as any ptr, byval buffer_len as integer, byval target as target_e ) as any ptr
Loads a png file that has been located in memory.
buffer | pointer to memory buffer holding the file. |
buffer_len | the length of the buffer. |
target | the target from target_e to load to. |
Pointer to png image in memory.
declare sub dimensions cdecl alias "png_dimensions" ( byref filename as const string, byref w as uinteger, byref h as uinteger )
Gets the dimensions of a png image without loading it.
filename | the file to get the dimensions of. |
w | will contain the width of the image. |
h | will contain the height of the image. |
declare sub dimensions_mem cdecl alias "png_dimensions_mem" ( byval buffer as const any ptr, byref w as uinteger, byref h as uinteger )
Gets the dimensions of a png file loaded in memory.
buffer | pointer to the memory buffer holding the file. |
w | will contain the width. |
h | will contain the height. |
Loads a png file.
declare function load cdecl alias "png_load" ( byref filename as const string, byval target as target_e = TARGET_FBNEW ) as any ptr
Loads a png file that has been located in memory.
declare function load_mem cdecl alias "png_load_mem" ( byval buffer as any ptr, byval buffer_len as integer, byval target as target_e ) as any ptr
Saves a png image from a memory buffer.
declare function save cdecl alias "png_save" ( byref filename as const string, byval img as const FB. IMAGE ptr ) as integer
Gets the dimensions of a png image without loading it.
declare sub dimensions cdecl alias "png_dimensions" ( byref filename as const string, byref w as uinteger, byref h as uinteger )
Gets the dimensions of a png file loaded in memory.
declare sub dimensions_mem cdecl alias "png_dimensions_mem" ( byval buffer as const any ptr, byref w as uinteger, byref h as uinteger )