分享
 
 
 

FreeImage function list

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

resource freeimage_load(string filename [, int flags])

Decodes a bitmap, allocates memory for it and then returns it as a FIBITMAP.

bool freeimage_save(resource bitmap, string filename [, int flags])

Saves a previously loaded FIBITMAP to a file.

void freeimage_unload(resource bitmap)

Deletes a previously loaded FIBITMAP from memory.

resource freeimage_clone(resource bitmap)

Makes an exact reproduction of an existing bitmap.

string freeimage_getversion()

Returns a string containing the current version of the DLL.

string freeimage_getcopyrightmessage()

Returns a string containing a standard copyright message.

string freeimage_getlasterror()

Returns the last error message.

int freeimage_getimagetype(resource bitmap)

Returns the data type of a bitmap.

int freeimage_getcolorsused(resource bitmap)

Returns the number of colors used in a bitmap. This function returns the palette-size for palletised bitmaps, and 0 for high-colour bitmaps.

int freeimage_getbpp(resource bitmap)

Returns the size of one pixel in the bitmap in bits. Possible bit depths are 1, 4, 8, 16, 24, 32, 64 and 128.

int freeimage_getwidth(resource bitmap)

Returns the width of the bitmap in pixels.

int freeimage_getheight(resource bitmap)

Returns the height of the bitmap in pixels.

int freeimage_getline(resource bitmap)

Returns the width of the bitmap in bytes.

int freeimage_getpitch(resource bitmap)

Returns the width of the bitmap in bytes, rounded to the next 32-bit boundary, also known as pitch or stride or scan width.

int freeimage_getdibsize(resource bitmap)

Returns the size of the DIB-element of a FIBITMAP in memory, i.e. the BITMAPINFOHEADER + palette + data bits.

int freeimage_getfiletype(string filename [, int size])

Returns one of the predefined FREE_IMAGE_FORMAT constants or a bitmap identification number registered by a plugin.

int freeimage_getfifcount()

Retrieves the number of FREE_IMAGE_FORMAT identifiers being currently registered.

bool freeimage_setpluginenabled(int fif [, bool enable])

Enables or disables a plugin.

bool freeimage_ispluginenabled(int fif)

Returns TRUE when the plugin is enabled, FALSE when the plugin is disabled, -1 otherwise.

int freeimage_getfiffromformat(string format)

Returns a FREE_IMAGE_FORMAT identifier from the format string that was used to register the FIF.

int freeimage_getfiffrommime(string mime)

Returns a FREE_IMAGE_FORMAT identifier from a MIME content type string (MIME stands for Multipurpose Internet Mail Extension).

string freeimage_getformatfromfif(int fif)

Returns the string that was used to register a plugin from the system assigned FREE_IMAGE_FORMAT.

string freeimage_getfifextensionlist(int fif)

Returns a comma-delimited file extension list describing the bitmap formats the given plugin can read and/or write.

string freeimage_getfifdescription(int fif)

Returns a descriptive string that describes the bitmap formats the given plugin can read and/or write.

string freeimage_getfifregexpr(int fif)

Returns a regular expression string that can be used by a regular expression engine to identify the bitmap.

int freeimage_getfiffromfilename(string filename)

Returns the plugin that can read/write files with that extension in the form of a FREE_IMAGE_FORMAT identifier.

bool freeimage_fifsupportsreading(int fif)

Returns TRUE if the plugin belonging to the given FREE_IMAGE_FORMAT can be used to load bitmaps, FALSE otherwise.

bool freeimage_fifsupportswriting(int fif)

Returns TRUE if the plugin belonging to the given FREE_IMAGE_FORMAT can be used to save bitmaps, FALSE otherwise.

resource freeimage_rotate(resource bitmap, double angle)

Rotates an 8-bit greyscale, 24- or 32-bit image by means of 3 shears.

resource freeimage_rotateex(resource bitmap, double angle, double x_shift, double y_shift, double x_origin, double y_origin, bool use_mask)

Performs a rotation and / or translation of an 8-bit greyscale, 24- or 32-bit image, using a 3rd order (cubic) B-Spline.

bool freeimage_fliphorizontal(resource bitmap)

Flip the input bitmap horizontally along the vertical axis.

bool freeimage_flipvertical(resource bitmap)

Flip the input bitmap vertically along the horizontal axis.

mixed freeimage_rescale(resource bitmap, int dst_width, int dst_height, int filter)

Performs resampling (or scaling, zooming) of a 8-, 24- or 32-bit image to the desired destination width and height.

bool freeimage_gamma(resource bitmap, double gamma)

Performs gamma correction on a 8-, 24- or 32-bit image. The function returns TRUE on success. It returns FALSE when gamma is less than or equal to zero or when the bitdepth of the source bitmap cannot be handled.

bool freeimage_brightness(resource bitmap, double percentage)

Adjusts the brightness of a 8-, 24- or 32-bit image by a certain amount. This amount is given by the percentage parameter, where percentage is a value between [-100..100]. A value 0 means no change, less than 0 will make the image darker and greater than 0 will make the image brighter. The function returns TRUE on success, FALSE otherwise (e.g. when the bitdepth of the source bitmap cannot be handled).

bool freeimage_contrast(resource bitmap, double percentage)

Adjusts the contrast of a 8-, 24- or 32-bit image by a certain amount. This amount is given by the percentage parameter, where percentage is a value between [-100..100]. A value 0 means no change, less than 0 will decrease the contrast and greater than 0 will increase the contrast of the image. The function returns TRUE on success, FALSE otherwise (e.g. when the bitdepth of the source bitmap cannot be handled).

bool freeimage_invert(resource bitmap)

Inverts each pixel data.

mixed freeimage_copy(resource bitmap, int left, int top, int right, int bottom)

Copy a sub part of the current bitmap image and returns it as a FIBITMAP*. The function returns the subimage if successful, NULL otherwise.

mixed freeimage_parse(resource dst, resource src, int left, int top, int alpha)

Alpha blend or combine a sub part image with the current bitmap image. The function returns TRUE if successful, FALSE otherwise.

resource freeimage_composite(resource fg [, bool usefilebkg [, mixed bkcolor [, resource bg]]])

This function composite a foreground image against a single background color or against a background image.

resource freeimage_convertto8bits(resource bitmap)

Converts a bitmap to 8 bits. If the bitmap was a high-color bitmap (16, 24 or 32-bit) or if it was a monochrome or greyscale bitmap (1 or 4-bit), the end result will be a greyscale bitmap, otherwise (1 or 4-bit palletised bitmaps) it will be a palletised bitmap.

resource freeimage_convertto16bits555(resource bitmap)

Converts a bitmap to 16 bits, where each pixel has a color pattern of 5 bits red, 5 bits green and 5 bits blue. One bit in each pixel is unused.

resource freeimage_convertto16bits565(resource bitmap)

Converts a bitmap to 16 bits, where each pixel has a color pattern of 5 bits red, 6 bits green and 5 bits blue.

resource freeimage_convertto24bits(resource bitmap)

Converts a bitmap to 24 bits.

resource freeimage_convertto32bits(resource bitmap)

Converts a bitmap to 32 bits.

resource freeimage_colorquantize(resource bitmap, int quantize)

Quantizes a high-color 24-bit bitmap to an 8-bit palette color bitmap.

resource freeimage_threshold(resource bitmap, int threshold)

Converts a bitmap to 1-bit monochrome bitmap using a threshold T between [0..255].

resource freeimage_dither(resource bitmap, int algorithm)

Converts a bitmap to 1-bit monochrome bitmap using a dithering algorithm.

resource freeimage_openmultibitmap(int fif, string filename, bool create_new, bool read_only [, bool keep_cache_in_memory])

Opens a multi-paged bitmap.

bool freeimage_closemultibitmap(resource multibitmap [, int flags])

Closes a previously opened multi-page bitmap and, when the bitmap was not opened read-only, applies any changes made to it.

int freeimage_getpagecount(resource multibitmap)

Returns the number of pages currently available in the multi-paged bitmap.

void freeimage_appendpage(resource multibitmap, resource bitmap)

Appends a new page to the end of the bitmap.

void freeimage_insertpage(resource multibitmap, int page, resource bitmap)

Inserts a new page before the given position in the bitmap. Page has to be a number smaller than the current number of pages available in the bitmap.

void freeimage_deletepage(resource multibitmap, int page)

Deletes the page on the given position.

resource freeimage_lockpage(resource multibitmap, int page)

Locks a page in memory for editing. The page can now be saved to a different file or inserted into another multi-page bitmap.

void freeimage_unlockpage(resource multibitmap, resource bitmap, bool changed)

Unlocks a previously locked page and gives it back to the multi-page engine. When the last parameter is TRUE, the page is marked changed and the new page data is applied in the multi-page bitmap.

bool freeimage_movepage(resource multibitmap, int target_page, int source_page)

Moves the source page to the position of the target page. Returns TRUE on success, FALSE on failure.

int freeimage_getlockedpagenumbers(resource multibitmap, int pages, int count)

Returns an array of page-numbers that are currently locked in memory. When the pages parameter is NULL, the size of the array is returned in the count variable. You can then allocate the array of the desired size and call FreeImage_GetLockedPageNumbers again to populate the array.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有