![]() Home Page Toolkit Overview Using GML User Input Services Finger Tracker Calibrator Frame Grabber Service protocol Obtaining GML Installing GML Licence Developer Documentation Tcl/Tk API The GML Canvas Image processing Tcl Scripts Library List of Classes List of Files C/C++ API List of Classes List of Files |
gmlBitmap class referenceUsed to manipulate color and grayscale images. constructorgmlBitmap objectName ?-width width? ?-height height? ?-encoding encoding? ?-rowOffset rowOffset? ?-fromTop fromTop? Create a new bitmap object named objectName. Geometry defaults to 320x240; encoding defaults to XRGB_8888. Row offset is the number of bytes between lines in the image. If unspecified, it will be choosen to maximise performance rather than space1. fromTop specifies the memory order of rows in the image (true means the first row in memory is the topmost).
object methodsobjectName copy destination ?-srcRect rect0? ?-dstRect rect1? This method is deprecated. Use gmlScannerCopy instead. Copy the contents of the rectangular region rect0 of objectName into the rectangular region rect1 of the bitmap object named destination. rect0 and rect1 default to the bounding rectangle of the respective bitmaps. The dimensions of the regions must match. The bitmaps' specifications do not have to be identical. In particular, the encodings may be different, although:
objectName fill ?-color color? ?-alpha factor? ?-roi rect? This method is deprecated. Use gmlScannerFill instead. objectName getWidth objectName getHeight objectName getEncoding objectName getRowOffset objectName getFromTop Return the corresponding property of the bitmap object objectName. objectName getSpec Return the list of all the above bitmap properties, in the documented order. objectName load file fileName ?-format formatName? objectName save file fileName ?-format formatName? ?-quality quality? Load an image file or save to an image file named fileName. format may be one of tiff, jpeg, png, bmp, ppm, or some other format. If unspecified, it will be infered from the file itself (when loading) or the filename's extension. When saving in jpeg format, quality may be specified as an integer value from 1 to 100. Note: the load method may change the specifications (in particular, the dimensions) of the bitmap. objectName load variable varName ?-format formatName? objectName save variable varName ?-format formatName? ?-quality quality? Load an image from the binary data in variable varName or store and image into a variable named varName. These methods behave exactly as would the load file and save file methods, except
These methods allow, for instance, to store images in a database or send images over a network connection. |
||
Contact: julien (dot) letessier (at) gmail (dot) com.
Copyright (c) 2000-2007 CLIPS-IMAG Laboratory, Grenoble, France. All rights reserved. W3CXHTML 1.0 W3CCSS 2.0 |