# arwen32dib

A port of win32dib to arwen. Provides fast bitmap manipulation (24-bit graphics).
The arwen32dib library creates creates and manipulates bitmaps which should be stored in variables declared with the a32Dib type.
Individual colours (BGR-tuples) can also be stored in variables declared with the a32Colour type.
To create a new bitmap, use the newDib function.
To create a copy a bitmap, use the copyDib function.
To create a copy of part a bitmap, use the extractDib function.
To load a bitmap from a file, use the loadDib function.
To save a bitmap to a file, use the saveDib procedure.
When you no longer need a bitmap, you have to delete it by calling the killDib procedure.
Example:

    include arwen32dib.ew
    a32Dib0 dib, dib2
        dib = newDib(width, height)     -- create a new bitmap with the specified width and height
        if integer(dib) then oops("bitmap could not be created") return end if
        dib2 = copyDib(dib)             -- creates a copy of the first bitmap
        if integer(dib2) then oops("bitmap could not be copied") return end if
        ... -- some code
        killDib(dib2)
        killDib(dib)                    -- delete the bitmaps. YOU HAVE TO DO THIS.

The file arwen32dib.ew is just:

        include a32dcore.ew -- CORE LIBRARY
        include a32dcolr.ew -- COLOR MANIPULATION LIBRARY
        include a32dgeom.ew -- GEOMETRIC MANIPULATION LIBRARY
        include a32dfltr.ew -- FILTER LIBRARY
        include a32dclip.ew -- CLIPBOARD LIBRARY
        include a32dpoly.ew -- POLYGON LIBRARY

Feel free to just include a32dcore.ew and maybe one or two others, if you prefer.