36define(
"FIF_UNKNOWN", -1);
41define(
"FIF_KOALA", 4);
46define(
"FIF_PBMRAW", 8);
50define(
"FIF_PGMRAW", 12);
53define(
"FIF_PPMRAW", 15);
55define(
"FIF_TARGA", 17);
56define(
"FIF_TIFF", 18);
57define(
"FIF_WBMP", 19);
68 $FI = wb_load_library(
"ext\\freeimage");
70 wb_message_box(
null,
"FreeImage extension could not be loaded.",
"Error", WBC_STOP);
82 $pfn = wb_get_function_address(
"FreeImage_GetVersion", $FI);
86 $version = wb_peek(wb_call_function($pfn));
96 $pfn = wb_get_function_address(
"FreeImage_GetInfoHeader", $FI);
97 return wb_call_function($pfn, array($dib));
106 $pfn = wb_get_function_address(
"FreeImage_GetBits", $FI);
107 return wb_call_function($pfn, array($dib));
116 $pfn = wb_get_function_address(
"FreeImage_Allocate@24", $FI);
117 return wb_call_function($pfn, array($width, $height, $bpp, 0, 0, 0));
126 $pfn = wb_get_function_address(
"FreeImage_Unload", $FI);
127 return wb_call_function($pfn, array($bmp));
136 $pfn = wb_get_function_address(
"FreeImage_GetWidth", $FI);
137 return wb_call_function($pfn, array($bmp));
146 $pfn = wb_get_function_address(
"FreeImage_GetHeight", $FI);
147 return wb_call_function($pfn, array($bmp));
156 $pfn = wb_get_function_address(
"FreeImage_Load", $FI);
157 return wb_call_function($pfn, array($type, $filename, $flags));
166 $pfn = wb_get_function_address(
"FreeImage_Save", $FI);
167 return wb_call_function($pfn, array($type, $dib, $filename, $flags));
176 $pfn = wb_get_function_address(
"FreeImage_Rescale", $FI);
177 return wb_call_function($pfn, array($dib, $dst_width, $dst_height, $filter));
FreeImage_GetHeight($bmp)
if(!isset( $FI)) FreeImage_GetVersion()
FreeImage_Rescale($dib, $dst_width, $dst_height, $filter=0)
FreeImage_Save($type, $dib, $filename, $flags=0)
FreeImage_Load($type, $filename, $flags=0)
FreeImage_GetInfoHeader($dib)
FreeImage_Allocate($width, $height, $bpp)