Top Documents Download Gallery Repository
Are you looking for a Software Engineer? Check Here

8bmp Module

The bmp module provides measures to read/write image data in Microsoft BMP format. To utilize it, import the bmp module using import function.

Below is an example to read a BMP file:

import(bmp)
img = image('foo.bmp')

8.1Exntension to Function's Capability

This module extends the capability of function image() and instance method image#write() so that they can read/write BMP files.

When function image() is provided with a stream that satisfies the following conditions, it would recognize the stream as a BMP file.

When instance method image#write() is provided with a stream that satisfies the following condition, it would write image data in BMP format.

8.2Extension to image Class

This module extends the image class with methods described here.

image#read@bmp
image#read@bmp(stream:stream:r):reduce
Reads an BMP image from a stream.

This method returns the reference to the target instance itself.

image#write@bmp
image#write@bmp(stream:stream:w):reduce
Writes a BMP image to a stream.

This method returns the reference to the target instance itself.


Copyright (C) 2011-2017 ypsitau