Chapter 42. imagelib
Thi9s library was started by Simpol Limited and extended significantly and contributed by John Roberts. It provides functionality for saving blobs as BMPs and XPM files, as well as reading them from such files.
BMP
Description
Type Tags
None
Object Value
Objects of type BMP have no value, and it is an error to try to get or set this value.
BMP.new()
Description
Prototype
BMP
.new
(
BMP
,
string me
,
string filename
)
name
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | BMP | |
filename | None | string | |
name | None | string |
Properties
Property | Type | Description |
---|---|---|
backcolor | integer | |
charsperpixel | integer | |
data | blob | |
filename | string | |
getdefbackcolor | function | |
getheader | function | |
header | BMP_header | |
height | integer | |
infoheader | BMP_infoheader | |
name | string | |
palette | colorpalette | |
readfromfile | function | |
rereadpalette | function | |
type | type | |
width | integer | |
writetofile | function |
Methods
getdefbackcolor()
Description
Prototype
BMPvar
.getdefbackcolor
(
BMP
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | BMP |
getheader()
Description
Prototype
BMPvar
.getheader
(
BMP
,
integer bmp
)
error
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
bmp | None | BMP | |
error | None | integer |
readfromfile()
Description
Prototype
BMPvar
.readfromfile
(
BMP
,
string me
,
integer filename
)
error
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | BMP | |
filename | None | string | |
error | None | integer |
rereadpalette()
Description
Prototype
BMPvar
.rereadpalette
(
BMP
,
boolean me
,
integer buildstrindx
)
error
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | BMP | |
buildstrindx | .false | boolean | |
error | None | integer |
writetofile()
Description
Prototype
BMPvar
.writetofile
(
BMP
,
string bmp
,
integer filename
,
integer bmpbits
)
error
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
bmp | None | BMP | |
filename | None | string | |
bmpbits | None | integer | |
error | None | integer |