1. Re: BMP

Don Scott wrote:
>
> I don't think I explained myself correctly...
>
> Colin Taylor has a bitmap.e file and explains this in his text file:
> "Windows bitmap (.bmp) files can be converted to Euphoria
> bitmaps by the read_bmp() routine." I want to know how to convert .bmp to
> (I assume) .bm files. An example is attached. Your help is appreciated!



this is direcly from library.doc, I hope it helps:

> DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD<read_bitmap>DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DD
>
>  Syntax:      include image.e
>             x = read_bitmap(st)
>
>  Description: st is the name of a .BMP "bitmap" file. The file should be in
>             the bitmap format. The most common variations of the format
>             are supported. If the file is read successfully the result will
>             be a 2-element sequence. The first element is the palette,
>             containing intensity values in the range 0 to 255. The
>             second element is a 2-d sequence of sequences containing a
>             pixel-graphics image. You can pass the palette to all_palette()
>             (after dividing it by 4 to scale it). The image can be passed
>             to display_image().
>
>             Bitmaps of 2, 4, 16 or 256 colors are supported. If the file is
>             not in a good format, an error code (atom) is returned instead:
>
>               global constant BMP_OPEN_FAILED = 1,
>                               BMP_UNEXPECTED_EOF = 2,
>                               BMP_UNSUPPORTED_FORMAT = 3
>
>  Comments:    You can create your own bitmap picture files using Windows
>             Paintbrush and many other graphics programs. You can then
>             incorporate these pictures into your Euphoria programs.
>
>  Example:     x = read_bitmap("c:\\windows\\arcade.bmp")
>             -- note: double backslash needed to get single backslash in
>                      a string
>
>  Example Program: demo\dos32\bitmap.ex
>
>  See Also:    palette, display_image
>



                        Kasey

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu