⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 freeimage.h

📁 墨香完整原代码 C++ 值得研究 可以编译
💻 H
📖 第 1 页 / 共 3 页
字号:
FI_STRUCT (Plugin);
FI_STRUCT (FreeImage);

typedef FIBITMAP *(DLL_CALLCONV *FI_AllocateProc)(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
typedef void (DLL_CALLCONV *FI_FreeProc)(FIBITMAP *dib);
typedef void (DLL_CALLCONV *FI_UnloadProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetColorsUsedProc)(FIBITMAP *dib);
typedef BYTE *(DLL_CALLCONV *FI_GetBitsProc)(FIBITMAP *dib);
typedef BYTE *(DLL_CALLCONV *FI_GetBitsRowColProc)(FIBITMAP *dib, int col, int row);
typedef BYTE *(DLL_CALLCONV *FI_GetScanLineProc)(FIBITMAP *dib, int scanline);
typedef unsigned (DLL_CALLCONV *FI_GetBPPProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetWidthProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetHeightProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetLineProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetPitchProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetDIBSizeProc)(FIBITMAP *dib);
typedef RGBQUAD *(DLL_CALLCONV *FI_GetPaletteProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetDotsPerMeterXProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetDotsPerMeterYProc)(FIBITMAP *dib);
typedef BITMAPINFOHEADER *(DLL_CALLCONV *FI_GetInfoHeaderProc)(FIBITMAP *dib);
typedef BITMAPINFO *(DLL_CALLCONV *FI_GetInfoProc)(FIBITMAP *dib);
typedef FREE_IMAGE_COLOR_TYPE (DLL_CALLCONV *FI_GetColorTypeProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetRedMaskProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetGreenMaskProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetBlueMaskProc)(FIBITMAP *dib);
typedef unsigned (DLL_CALLCONV *FI_GetTransparencyCountProc)(FIBITMAP *dib);
typedef BYTE * (DLL_CALLCONV *FI_GetTransparencyTableProc)(FIBITMAP *dib);
typedef void (DLL_CALLCONV *FI_SetTransparencyTableProc)(FIBITMAP *dib, BYTE *table, int count);
typedef BOOL (DLL_CALLCONV *FI_IsTransparentProc)(FIBITMAP *dib);
typedef void (DLL_CALLCONV *FI_SetTransparentProc)(FIBITMAP *dib, BOOL enabled);
typedef void (DLL_CALLCONV *FI_OutputMessageProc)(int fif, const char *fmt, ...);
typedef void (DLL_CALLCONV *FI_ConvertLine1To8Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine4To8Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine16To8_555Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine16To8_565Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine24To8Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine32To8Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine1To16_555Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine4To16_555Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine8To16_555Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine16_565_To16_555Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine24To16_555Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine32To16_555Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine1To16_565Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine4To16_565Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine8To16_565Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine16_555_To16_565Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine24To16_565Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine32To16_565Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine1To24Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine4To24Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine8To24Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine16To24_555Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine16To24_565Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine32To24Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine1To32Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine4To32Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine8To32Proc)(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
typedef void (DLL_CALLCONV *FI_ConvertLine16To32_555Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine16To32_565Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_ConvertLine24To32Proc)(BYTE *target, BYTE *source, int width_in_pixels);
typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);

typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);
typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);

typedef const char *(DLL_CALLCONV *FI_FormatProc) ();
typedef const char *(DLL_CALLCONV *FI_DescriptionProc) ();
typedef const char *(DLL_CALLCONV *FI_ExtensionListProc) ();
typedef const char *(DLL_CALLCONV *FI_RegExprProc) ();
typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data);
typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data);
typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data);
typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImage *freeimage, FreeImageIO *io, fi_handle handle, int page, int flags, void *data);
typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImage *freeimage, FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data);
typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
typedef const char *(DLL_CALLCONV *FI_MimeProc) ();
typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp);

FI_STRUCT(FreeImage) {
	FI_AllocateProc allocate_proc;
	FI_UnloadProc unload_proc;
	FI_FreeProc free_proc;
	FI_GetColorsUsedProc get_colors_used_proc;
	FI_GetBitsProc get_bits_proc;
	FI_GetBitsRowColProc get_bits_row_col_proc;
	FI_GetScanLineProc get_scanline_proc;
	FI_GetBPPProc get_bpp_proc;
	FI_GetWidthProc get_width_proc;
	FI_GetHeightProc get_height_proc;
	FI_GetLineProc get_line_proc;
	FI_GetPitchProc get_pitch_proc;
	FI_GetDIBSizeProc get_dib_size_proc;
	FI_GetPaletteProc get_palette_proc;
	FI_GetDotsPerMeterXProc get_dots_per_meter_x_proc;
	FI_GetDotsPerMeterYProc get_dots_per_meter_y_proc;
	FI_GetInfoHeaderProc get_info_header_proc;
	FI_GetInfoProc get_info_proc;
	FI_GetColorTypeProc get_color_type_proc;
	FI_GetRedMaskProc get_red_mask_proc;
	FI_GetGreenMaskProc get_green_mask_proc;
	FI_GetBlueMaskProc get_blue_mask_proc;
	FI_GetTransparencyCountProc get_transparency_count_proc;
	FI_GetTransparencyTableProc get_transparency_table_proc;
	FI_SetTransparencyTableProc set_transparency_table_proc;
	FI_IsTransparentProc is_transparent_proc;
	FI_SetTransparentProc set_transparent_proc;
	FI_OutputMessageProc output_message_proc;
	FI_ConvertLine1To8Proc convert_line1to8_proc;
	FI_ConvertLine4To8Proc convert_line_4to8_proc;
	FI_ConvertLine16To8_555Proc convert_line_16to8_555_proc;
	FI_ConvertLine16To8_565Proc convert_line_16to8_565_proc;
	FI_ConvertLine24To8Proc convert_line_24to8_proc;
	FI_ConvertLine32To8Proc convert_line_32to8_proc;
	FI_ConvertLine1To16_555Proc convert_line_1to16_555_proc;
	FI_ConvertLine4To16_555Proc convert_line_4to16_555_proc;
	FI_ConvertLine8To16_555Proc convert_line_8to16_555_proc;
	FI_ConvertLine16_565_To16_555Proc convert_line_16_565_to_16_555_proc;
	FI_ConvertLine24To16_555Proc convert_line_24to16_555_proc;
	FI_ConvertLine32To16_555Proc convert_line_32to16_555_proc;
	FI_ConvertLine1To16_565Proc convert_line_1to16_565_proc;
	FI_ConvertLine4To16_565Proc convert_line_4to16_565_proc;
	FI_ConvertLine8To16_565Proc convert_line_8to16_565_proc;
	FI_ConvertLine16_555_To16_565Proc convert_line_16_555_to_16_565_proc;
	FI_ConvertLine24To16_565Proc convert_line_24to16_565_proc;
	FI_ConvertLine32To16_565Proc convert_line_32to16_565_proc;
	FI_ConvertLine1To24Proc convert_line_1to24_proc;
	FI_ConvertLine4To24Proc convert_line_4to24_proc;
	FI_ConvertLine8To24Proc convert_line_8to24_proc;
	FI_ConvertLine16To24_555Proc convert_line_16to24_555_proc;
	FI_ConvertLine16To24_565Proc convert_line_16to24_565_proc;
	FI_ConvertLine32To24Proc convert_line_32to24_proc;
	FI_ConvertLine1To32Proc convert_line_1to32_proc;
	FI_ConvertLine4To32Proc convert_line_4to32_proc;
	FI_ConvertLine8To32Proc convert_line_8to32_proc;
	FI_ConvertLine16To32_555Proc convert_line_16to32_555_proc;
	FI_ConvertLine16To32_565Proc convert_line_16to32_565_proc;
	FI_ConvertLine24To32Proc convert_line_24to32_proc;	
};

FI_STRUCT (Plugin) {
	FI_FormatProc format_proc;
	FI_DescriptionProc description_proc;
	FI_ExtensionListProc extension_proc;
	FI_RegExprProc regexpr_proc;
	FI_OpenProc open_proc;
	FI_CloseProc close_proc;
	FI_PageCountProc pagecount_proc;
	FI_PageCapabilityProc pagecapability_proc;
	FI_LoadProc load_proc;
	FI_SaveProc save_proc;
	FI_ValidateProc validate_proc;
	FI_MimeProc mime_proc;
	FI_SupportsExportBPPProc supports_export_bpp_proc;
};

#endif
#endif

// Load/Save flag constants -----------------------------------------------------

#define BMP_DEFAULT         0
#define CUT_DEFAULT         0
#define ICO_DEFAULT         0
#define ICO_FIRST           0
#define ICO_SECOND          0
#define ICO_THIRD           0
#define IFF_DEFAULT         0
#define JPEG_DEFAULT        0
#define JPEG_FAST           1
#define JPEG_ACCURATE       2
#define JPEG_QUALITYSUPERB  0x80
#define JPEG_QUALITYGOOD    0x100
#define JPEG_QUALITYNORMAL  0x200
#define JPEG_QUALITYAVERAGE 0x400
#define JPEG_QUALITYBAD     0x800
#define KOALA_DEFAULT       0
#define LBM_DEFAULT         0
#define MNG_DEFAULT         0
#define PCD_DEFAULT         0
#define PCD_BASE            1
#define PCD_BASEDIV4        2
#define PCD_BASEDIV16       3
#define PCX_DEFAULT         0
#define PNG_DEFAULT         0
#define PNG_IGNOREGAMMA		1		// avoid gamma correction
#define PNM_DEFAULT         0
#define PNM_SAVE_RAW        0       // If set the writer saves in RAW format (i.e. P4, P5 or P6)
#define PNM_SAVE_ASCII      1       // If set the writer saves in ASCII format (i.e. P1, P2 or P3)
#define RAS_DEFAULT         0
#define TARGA_DEFAULT       0
#define TARGA_LOAD_RGB888   1       // If set the loader converts RGB555 and ARGB8888 -> RGB888.
#define TARGA_LOAD_RGB555   2       // This flag is obsolete
#define TIFF_DEFAULT        0
#define WBMP_DEFAULT        0
#define PSD_DEFAULT         0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -