imFileImageLoadBitmap
Definition: |
include pGUI.e
imImage im = imFileImageLoadBitmap(string filename, integer index=0, atom pError=NULL) |
Description: |
Loads an image from file, but forces the image to be a bitmap. Opens, loads and closes the file.
filename: Name of the file to be loaded. index: specifies the image number between 0 and image_count-1. pError: pointer to allocated memory which recieves an error code. Returns NULL on failure. Attributes from the file will be stored with the image. See also imErrorCodes. |
pwa/p2js: | Not supported |
Notes: |
This wraps the C function imFileImageLoadBitmap, which IupLoadImage invokes internally (when appropriate).
Use IupLoadImage to obtain an Ihandle which can be used on a control; imFileImageLoadBitmap returns an
imImage, which is more suitable for image manipulation. See simple_paint.exw for an example of use.
|
Auxillary Functions |
The following routines can be used with imImage handles (see simple_paint.exw for examples of use):
integer width = im_width(imImage image) -- (ie im_width(image) is equilvalent to image->width in C)
integer height = im_height(imImage image) -- (ie im_height(image) is equilvalent to image->height in C)
integer depth = im_depth(imImage image) -- (ie im_depth(image) is equilvalent to image->depth in C)
integer color_space = im_color_space(imImage image) -- (ie im_color_space(image) is equilvalent to image->color_space in C)
atom dataptr = im_data(imImage image) -- (ie im_data(image) is equilvalent to image->data in C)
integer {r,g,b} = im_pixel(imImage image, integer x, y) imImageSetAttribString(imImage image, string attrib, nullable_string v) string res = imImageGetAttribString(imImage image, string attrib) Returns "" if not found. integer error = imFileImageSave(string filename, string fmt, imImage image) imProcessRenderFloodFill(imImage image, integer start_x, start_y, sequence replace_color, atom tolerance) imProcessRenderConstant(imImage image, sequence v) imImage image = imImageDestroy(imImage image) -- (returns/sets image to NULL) imConvertPacking(atom pSrcData, pDstData, integer width, height, src_depth, dst_depth, data_type, src_is_packed) imImageRemoveAlpha(imImage image) imImage res = imImageCreateBased(imImage image, integer width=-1, height=-1, color_space=-1, data_type=-1) imConvertColorSpace(imImage src_image, imImage dst_image) imImage image = imImageCreate(integer width, height, color_space, data_type) imProcessResize(imImage src_image, imImage dst_image, integer order) imImage clone = imImageClone(imImage image) imProcessMirror(imImage src_image, imImage dst_image) imProcessFlip(imImage src_image, imImage dst_image) imProcessRotate180(imImage src_image, imImage dst_image) imProcessRotate90(imImage src_image, imImage dst_image, integer dir_clockwise) imProcessNegative(imImage src_image, imImage dst_image) imProcessToneGamut(imImage src_image, imImage dst_image, integer op, sequence params) atom pData = imImageGetOpenGLData(imImage image) |