------------------
------------------
What is it ?
------------
BDGfxLib is a library for BlitzBasic.
What's new ?
------------
Fixed a litle bug in SaveILBM. DeluxePaint couldn't
load the picture. But now, it can !!!
The Commands are :
------------------
Match.w = FindColor(Pal#,Red,Green,Blue[,Accuracy])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This command will find in the palette pal#, the
closest colour to Red,Green,Blue...
------------------------------------------------------
CGrey.w = ColorGrey(Pal#,Color#)
~~~~~~~~~~~~~~~~~~~~~~
This command will return the Grey value
of the colour Color# in the palette Pal#
------------------------------------------------------
CGrey.w = ColorToGrey(Pal#,Color#)
~~~~~~~~~~~~~~~~~~~~~~~~
This command will do the same as ColorGrey, but it will
set the Red,Green & Blue to the return value
------------------------------------------------------
Suc.l = SaveILBM(BitMap#,Filename$,BtmHeader,ViewMode.l,Palette#)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
or
SaveILBM BitMap#,Filename$,BtmHeader,ViewMode.l,Palette#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This command will save the bitmap BitMap# with the palette Palette#,
as an IFF-ILBM file named Filename$
I've made this command to patch the SaveBitMap and SaveScreen
commands from Blitz, wich got a BUG !!! (Sometimes, there are
a black border on the right of the saved picture !!! Why ?
Just because these commands don't want to know the real Width
of your picture, thinking the Width is always BytePerRow*8... )
So, YOU NEED TO SET A BitMapHeader to store the correct value
of your picture !!! BitMapHeader is defined like this :
***** datatypes/pictureclass.h ****
NEWTYPE.BitMapHeader
bmh_Width.w ; BitMap Width
bmh_Height.w ; BitMap Height
bmh_Left.w ; MUST BE 0 !!!
bmh_Top.w ; MUST BE 0 !!!
bmh_Depth.b ; BitMap Depth
bmh_Masking.b ; 0=No Mask OR 2=We got a ColorMask
bmh_Compression.b ; 0=Not Compressed 1=Compressed
bmh_Pad.b ; MUST BE 0 !!!
bmh_Transparent.w ; Used if bmh_Masking=2
bmh_XAspect.b ; Aspect in Width
bmh_YAspect.b ; Aspect in Height
bmh_PageWidth.w ; Screen Width ( Can be same as BitMap )
bmh_PageHeight.w ; Screen Height ( Can be same as BitMap )
End NEWTYPE
Return Code from SaveILBM :
-1 : Well done !!!
2 : Can't alloc mem
3 : Can't open the file
4 : Can't write the file
-----------------
Xavier NUEL
17.03.98, ANGERS (France)
BadDolls Production (c)
|