ruby-iup 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +97 -0
- data/doc/README +10 -0
- data/doc/build_install.txt +77 -0
- data/examples/README +16 -0
- data/examples/ctrl/cbox.rb +221 -0
- data/examples/ctrl/checkboard.rb +33 -0
- data/examples/ctrl/degrade.rb +73 -0
- data/examples/ctrl/example1.rb +53 -0
- data/examples/ctrl/example2.rb +39 -0
- data/examples/ctrl/iupcolorbar.rb +95 -0
- data/examples/ctrl/iupcolorbrowser.rb +45 -0
- data/examples/ctrl/iupdial.rb +117 -0
- data/examples/ctrl/iupgauge.rb +242 -0
- data/examples/ctrl/iupgetcolor.rb +8 -0
- data/examples/ctrl/iupgetparam.rb +62 -0
- data/examples/ctrl/iupglcanvas.rb +172 -0
- data/examples/ctrl/iupmask.rb +15 -0
- data/examples/ctrl/iupmatrix.rb +39 -0
- data/examples/ctrl/iupplot2.rb +603 -0
- data/examples/ctrl/iuptabs.rb +22 -0
- data/examples/ctrl/iuptree.rb +190 -0
- data/examples/ctrl/iupval.rb +71 -0
- data/examples/ctrl/numbering.rb +46 -0
- data/examples/ctrl/sample.rb +166 -0
- data/examples/dlg/iupalarm.rb +14 -0
- data/examples/dlg/iupfiledlg.rb +19 -0
- data/examples/dlg/iupgetfile.rb +19 -0
- data/examples/dlg/iuplistdialog.rb +26 -0
- data/examples/dlg/iupmessage.rb +5 -0
- data/examples/dlg/iupscanf.rb +17 -0
- data/examples/elem/iupbutton.rb +197 -0
- data/examples/elem/iupcanvas.rb +27 -0
- data/examples/elem/iupcanvas2.rb +113 -0
- data/examples/elem/iupcanvas3.rb +62 -0
- data/examples/elem/iupdialog.rb +71 -0
- data/examples/elem/iupdialog2.rb +25 -0
- data/examples/elem/iupfill.rb +51 -0
- data/examples/elem/iupframe.rb +25 -0
- data/examples/elem/iuphbox.rb +68 -0
- data/examples/elem/iupimage.rb +113 -0
- data/examples/elem/iupitem.rb +60 -0
- data/examples/elem/iuplabel.rb +57 -0
- data/examples/elem/iuplist.rb +41 -0
- data/examples/elem/iuplist2.rb +125 -0
- data/examples/elem/iupmenu.rb +32 -0
- data/examples/elem/iupmultiline.rb +24 -0
- data/examples/elem/iupmultiline2.rb +156 -0
- data/examples/elem/iupradio.rb +32 -0
- data/examples/elem/iupseparator.rb +81 -0
- data/examples/elem/iupsubmenu.rb +85 -0
- data/examples/elem/iuptext.rb +61 -0
- data/examples/elem/iuptimer.rb +36 -0
- data/examples/elem/iuptoggle.rb +110 -0
- data/examples/elem/iupvbox.rb +87 -0
- data/examples/elem/iupzbox.rb +60 -0
- data/examples/elem/mdisample.rb +376 -0
- data/examples/elem/progressbar.rb +294 -0
- data/examples/elem/scrollbar.rb +66 -0
- data/examples/elem/tray.rb +90 -0
- data/examples/func/iupgetattribute.rb +32 -0
- data/examples/func/iupidle.rb +48 -0
- data/ext/extconf.rb +27 -0
- data/ext/iup-linux/include/cd.h +494 -0
- data/ext/iup-linux/include/cd_canvas.hpp +358 -0
- data/ext/iup-linux/include/cd_old.h +158 -0
- data/ext/iup-linux/include/cd_private.h +362 -0
- data/ext/iup-linux/include/cdcgm.h +34 -0
- data/ext/iup-linux/include/cdclipbd.h +22 -0
- data/ext/iup-linux/include/cddbuf.h +23 -0
- data/ext/iup-linux/include/cddebug.h +24 -0
- data/ext/iup-linux/include/cddgn.h +23 -0
- data/ext/iup-linux/include/cddxf.h +22 -0
- data/ext/iup-linux/include/cdemf.h +22 -0
- data/ext/iup-linux/include/cdgdiplus.h +29 -0
- data/ext/iup-linux/include/cdimage.h +23 -0
- data/ext/iup-linux/include/cdirgb.h +30 -0
- data/ext/iup-linux/include/cdiup.h +22 -0
- data/ext/iup-linux/include/cdlua.h +39 -0
- data/ext/iup-linux/include/cdlua3_private.h +120 -0
- data/ext/iup-linux/include/cdlua5_private.h +141 -0
- data/ext/iup-linux/include/cdluaim.h +24 -0
- data/ext/iup-linux/include/cdluaiup.h +27 -0
- data/ext/iup-linux/include/cdluapdf.h +27 -0
- data/ext/iup-linux/include/cdmf.h +24 -0
- data/ext/iup-linux/include/cdmf_private.h +32 -0
- data/ext/iup-linux/include/cdnative.h +26 -0
- data/ext/iup-linux/include/cdpdf.h +38 -0
- data/ext/iup-linux/include/cdpicture.h +22 -0
- data/ext/iup-linux/include/cdprint.h +23 -0
- data/ext/iup-linux/include/cdps.h +37 -0
- data/ext/iup-linux/include/cdwmf.h +22 -0
- data/ext/iup-linux/include/im.h +282 -0
- data/ext/iup-linux/include/im_attrib.h +116 -0
- data/ext/iup-linux/include/im_attrib_flat.h +39 -0
- data/ext/iup-linux/include/im_binfile.h +214 -0
- data/ext/iup-linux/include/im_capture.h +365 -0
- data/ext/iup-linux/include/im_color.h +465 -0
- data/ext/iup-linux/include/im_colorhsi.h +61 -0
- data/ext/iup-linux/include/im_complex.h +160 -0
- data/ext/iup-linux/include/im_convert.h +127 -0
- data/ext/iup-linux/include/im_counter.h +69 -0
- data/ext/iup-linux/include/im_dib.h +195 -0
- data/ext/iup-linux/include/im_file.h +111 -0
- data/ext/iup-linux/include/im_format.h +79 -0
- data/ext/iup-linux/include/im_format_all.h +576 -0
- data/ext/iup-linux/include/im_format_avi.h +87 -0
- data/ext/iup-linux/include/im_format_ecw.h +93 -0
- data/ext/iup-linux/include/im_format_jp2.h +78 -0
- data/ext/iup-linux/include/im_format_raw.h +64 -0
- data/ext/iup-linux/include/im_format_wmv.h +100 -0
- data/ext/iup-linux/include/im_image.h +403 -0
- data/ext/iup-linux/include/im_kernel.h +315 -0
- data/ext/iup-linux/include/im_lib.h +191 -0
- data/ext/iup-linux/include/im_math.h +368 -0
- data/ext/iup-linux/include/im_math_op.h +219 -0
- data/ext/iup-linux/include/im_palette.h +172 -0
- data/ext/iup-linux/include/im_plus.h +73 -0
- data/ext/iup-linux/include/im_process.h +35 -0
- data/ext/iup-linux/include/im_process_ana.h +221 -0
- data/ext/iup-linux/include/im_process_glo.h +170 -0
- data/ext/iup-linux/include/im_process_loc.h +577 -0
- data/ext/iup-linux/include/im_process_pon.h +712 -0
- data/ext/iup-linux/include/im_raw.h +34 -0
- data/ext/iup-linux/include/im_util.h +277 -0
- data/ext/iup-linux/include/imlua.h +83 -0
- data/ext/iup-linux/include/iup.h +255 -0
- data/ext/iup-linux/include/iup_pplot.h +40 -0
- data/ext/iup-linux/include/iupcb.h +25 -0
- data/ext/iup-linux/include/iupcbox.h +23 -0
- data/ext/iup-linux/include/iupcbs.h +42 -0
- data/ext/iup-linux/include/iupcells.h +130 -0
- data/ext/iup-linux/include/iupcolorbar.h +126 -0
- data/ext/iup-linux/include/iupcompat.h +62 -0
- data/ext/iup-linux/include/iupcontrols.h +40 -0
- data/ext/iup-linux/include/iupcpi.h +76 -0
- data/ext/iup-linux/include/iupdef.h +520 -0
- data/ext/iup-linux/include/iupdial.h +64 -0
- data/ext/iup-linux/include/iupgauge.h +57 -0
- data/ext/iup-linux/include/iupgc.h +20 -0
- data/ext/iup-linux/include/iupgetparam.h +27 -0
- data/ext/iup-linux/include/iupgl.h +101 -0
- data/ext/iup-linux/include/iupim.h +21 -0
- data/ext/iup-linux/include/iupkey.h +290 -0
- data/ext/iup-linux/include/iuplua.h +41 -0
- data/ext/iup-linux/include/iuplua_pplot.h +26 -0
- data/ext/iup-linux/include/iupluacontrols.h +27 -0
- data/ext/iup-linux/include/iupluagl.h +26 -0
- data/ext/iup-linux/include/iupluaim.h +26 -0
- data/ext/iup-linux/include/iupluaole.h +26 -0
- data/ext/iup-linux/include/iupmask.h +52 -0
- data/ext/iup-linux/include/iupmatrix.h +69 -0
- data/ext/iup-linux/include/iupole.h +24 -0
- data/ext/iup-linux/include/iupsbox.h +20 -0
- data/ext/iup-linux/include/iupspeech.h +23 -0
- data/ext/iup-linux/include/iupspin.h +21 -0
- data/ext/iup-linux/include/iuptabs.h +79 -0
- data/ext/iup-linux/include/iuptree.h +93 -0
- data/ext/iup-linux/include/iupval.h +46 -0
- data/ext/iup-linux/include/lauxlib.h +174 -0
- data/ext/iup-linux/include/lua.h +388 -0
- data/ext/iup-linux/include/lua.hpp +9 -0
- data/ext/iup-linux/include/luaconf.h +763 -0
- data/ext/iup-linux/include/lualib.h +53 -0
- data/ext/iup-linux/include/old_im.h +59 -0
- data/ext/iup-linux/include/wd.h +78 -0
- data/ext/iup-linux/include/wd_old.h +85 -0
- data/ext/iup-linux/libcd.so +0 -0
- data/ext/iup-linux/libcdcontextplus.so +0 -0
- data/ext/iup-linux/libcdluacontextplus51.so +0 -0
- data/ext/iup-linux/libcdpdf.so +0 -0
- data/ext/iup-linux/libfreetype.so +0 -0
- data/ext/iup-linux/libim.so +0 -0
- data/ext/iup-linux/libim_fftw.so +0 -0
- data/ext/iup-linux/libim_jp2.so +0 -0
- data/ext/iup-linux/libim_process.so +0 -0
- data/ext/iup-linux/libiup.so +0 -0
- data/ext/iup-linux/libiup_pplot.so +0 -0
- data/ext/iup-linux/libiupcd.so +0 -0
- data/ext/iup-linux/libiupcontrols.so +0 -0
- data/ext/iup-linux/libiupgl.so +0 -0
- data/ext/iup-linux/libiupim.so +0 -0
- data/ext/iup-linux/libiupimglib.so +0 -0
- data/ext/iup-linux/libpdflib.so +0 -0
- data/ext/iup-win32/cd.dll +0 -0
- data/ext/iup-win32/cd.lib +0 -0
- data/ext/iup-win32/cdcontextplus.dll +0 -0
- data/ext/iup-win32/cdcontextplus.lib +0 -0
- data/ext/iup-win32/cdlua51.lib +0 -0
- data/ext/iup-win32/cdluacontextplus51.lib +0 -0
- data/ext/iup-win32/cdluaim51.lib +0 -0
- data/ext/iup-win32/cdluapdf51.lib +0 -0
- data/ext/iup-win32/cdpdf.dll +0 -0
- data/ext/iup-win32/cdpdf.lib +0 -0
- data/ext/iup-win32/freetype6.dll +0 -0
- data/ext/iup-win32/freetype6.lib +0 -0
- data/ext/iup-win32/im.dll +0 -0
- data/ext/iup-win32/im_avi.dll +0 -0
- data/ext/iup-win32/im_capture.dll +0 -0
- data/ext/iup-win32/im_ecw.dll +0 -0
- data/ext/iup-win32/im_fftw.dll +0 -0
- data/ext/iup-win32/im_jp2.dll +0 -0
- data/ext/iup-win32/im_process.dll +0 -0
- data/ext/iup-win32/im_wmv.dll +0 -0
- data/ext/iup-win32/include/cd.h +494 -0
- data/ext/iup-win32/include/cd_canvas.hpp +358 -0
- data/ext/iup-win32/include/cd_old.h +158 -0
- data/ext/iup-win32/include/cd_private.h +362 -0
- data/ext/iup-win32/include/cdcgm.h +34 -0
- data/ext/iup-win32/include/cdclipbd.h +22 -0
- data/ext/iup-win32/include/cddbuf.h +23 -0
- data/ext/iup-win32/include/cddebug.h +24 -0
- data/ext/iup-win32/include/cddgn.h +23 -0
- data/ext/iup-win32/include/cddxf.h +22 -0
- data/ext/iup-win32/include/cdemf.h +22 -0
- data/ext/iup-win32/include/cdgdiplus.h +29 -0
- data/ext/iup-win32/include/cdimage.h +23 -0
- data/ext/iup-win32/include/cdirgb.h +30 -0
- data/ext/iup-win32/include/cdiup.h +22 -0
- data/ext/iup-win32/include/cdlua.h +39 -0
- data/ext/iup-win32/include/cdlua3_private.h +120 -0
- data/ext/iup-win32/include/cdlua5_private.h +141 -0
- data/ext/iup-win32/include/cdluaim.h +24 -0
- data/ext/iup-win32/include/cdluaiup.h +27 -0
- data/ext/iup-win32/include/cdluapdf.h +27 -0
- data/ext/iup-win32/include/cdmf.h +24 -0
- data/ext/iup-win32/include/cdmf_private.h +32 -0
- data/ext/iup-win32/include/cdnative.h +26 -0
- data/ext/iup-win32/include/cdpdf.h +38 -0
- data/ext/iup-win32/include/cdpicture.h +22 -0
- data/ext/iup-win32/include/cdprint.h +23 -0
- data/ext/iup-win32/include/cdps.h +37 -0
- data/ext/iup-win32/include/cdwmf.h +22 -0
- data/ext/iup-win32/include/iup.h +255 -0
- data/ext/iup-win32/include/iup_pplot.h +40 -0
- data/ext/iup-win32/include/iupcb.h +25 -0
- data/ext/iup-win32/include/iupcbox.h +23 -0
- data/ext/iup-win32/include/iupcbs.h +42 -0
- data/ext/iup-win32/include/iupcells.h +130 -0
- data/ext/iup-win32/include/iupcolorbar.h +126 -0
- data/ext/iup-win32/include/iupcompat.h +62 -0
- data/ext/iup-win32/include/iupcontrols.h +40 -0
- data/ext/iup-win32/include/iupcpi.h +76 -0
- data/ext/iup-win32/include/iupdef.h +520 -0
- data/ext/iup-win32/include/iupdial.h +64 -0
- data/ext/iup-win32/include/iupgauge.h +57 -0
- data/ext/iup-win32/include/iupgc.h +20 -0
- data/ext/iup-win32/include/iupgetparam.h +27 -0
- data/ext/iup-win32/include/iupgl.h +101 -0
- data/ext/iup-win32/include/iupim.h +21 -0
- data/ext/iup-win32/include/iupkey.h +290 -0
- data/ext/iup-win32/include/iuplua.h +41 -0
- data/ext/iup-win32/include/iuplua_pplot.h +26 -0
- data/ext/iup-win32/include/iupluacontrols.h +27 -0
- data/ext/iup-win32/include/iupluagl.h +26 -0
- data/ext/iup-win32/include/iupluaim.h +26 -0
- data/ext/iup-win32/include/iupluaole.h +26 -0
- data/ext/iup-win32/include/iupmask.h +52 -0
- data/ext/iup-win32/include/iupmatrix.h +69 -0
- data/ext/iup-win32/include/iupole.h +24 -0
- data/ext/iup-win32/include/iupsbox.h +20 -0
- data/ext/iup-win32/include/iupspeech.h +23 -0
- data/ext/iup-win32/include/iupspin.h +21 -0
- data/ext/iup-win32/include/iuptabs.h +79 -0
- data/ext/iup-win32/include/iuptree.h +93 -0
- data/ext/iup-win32/include/iupval.h +46 -0
- data/ext/iup-win32/include/wd.h +78 -0
- data/ext/iup-win32/include/wd_old.h +85 -0
- data/ext/iup-win32/iup.dll +0 -0
- data/ext/iup-win32/iup.lib +0 -0
- data/ext/iup-win32/iup_pplot.dll +0 -0
- data/ext/iup-win32/iup_pplot.lib +0 -0
- data/ext/iup-win32/iupcd.dll +0 -0
- data/ext/iup-win32/iupcd.lib +0 -0
- data/ext/iup-win32/iupcontrols.dll +0 -0
- data/ext/iup-win32/iupcontrols.lib +0 -0
- data/ext/iup-win32/iupgl.dll +0 -0
- data/ext/iup-win32/iupgl.lib +0 -0
- data/ext/iup-win32/iupim.dll +0 -0
- data/ext/iup-win32/iupim.lib +0 -0
- data/ext/iup-win32/iupimglib.dll +0 -0
- data/ext/iup-win32/iupimglib.lib +0 -0
- data/ext/iup-win32/iuplua51.lib +0 -0
- data/ext/iup-win32/iuplua_pplot51.lib +0 -0
- data/ext/iup-win32/iupluacd51.lib +0 -0
- data/ext/iup-win32/iupluacontrols51.lib +0 -0
- data/ext/iup-win32/iupluagl51.lib +0 -0
- data/ext/iup-win32/iupluaim51.lib +0 -0
- data/ext/iup-win32/iupluaimglib51.lib +0 -0
- data/ext/iup-win32/iupluaole51.lib +0 -0
- data/ext/iup-win32/iupole.dll +0 -0
- data/ext/iup-win32/iupole.lib +0 -0
- data/ext/iup-win32/iupstub.lib +0 -0
- data/ext/iup-win32/pdflib.dll +0 -0
- data/ext/iup-win32/pdflib.lib +0 -0
- data/ext/iup.c +1261 -0
- data/ext/mkrf_conf.rb +72 -0
- data/ext/rb_cd.h +1525 -0
- data/ext/rb_iup.h +2446 -0
- data/ext/rb_iup_pplot.h +129 -0
- data/ext/rb_iupcb.h +13 -0
- data/ext/rb_iupcbox.h +40 -0
- data/ext/rb_iupcells.h +15 -0
- data/ext/rb_iupcolorbar.h +17 -0
- data/ext/rb_iupcompat.h +237 -0
- data/ext/rb_iupcontrols.h +28 -0
- data/ext/rb_iupdef.h +3 -0
- data/ext/rb_iupdial.h +24 -0
- data/ext/rb_iupgauge.h +15 -0
- data/ext/rb_iupgc.h +18 -0
- data/ext/rb_iupgetparam.h +72 -0
- data/ext/rb_iupgl.h +58 -0
- data/ext/rb_iupim.h +25 -0
- data/ext/rb_iupmask.h +189 -0
- data/ext/rb_iupmatrix.h +80 -0
- data/ext/rb_iupole.h +24 -0
- data/ext/rb_iupsbox.h +23 -0
- data/ext/rb_iupspeech.h +25 -0
- data/ext/rb_iupspin.h +29 -0
- data/ext/rb_iuptabs.h +29 -0
- data/ext/rb_iuptree.h +94 -0
- data/ext/rb_iupval.h +24 -0
- data/lib/README +1 -0
- metadata +391 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
/** \file
|
2
|
+
* \brief Register the AVI Format
|
3
|
+
*
|
4
|
+
* See Copyright Notice in im_lib.h
|
5
|
+
*/
|
6
|
+
|
7
|
+
#ifndef __IM_FORMAT_AVI_H
|
8
|
+
#define __IM_FORMAT_AVI_H
|
9
|
+
|
10
|
+
#if defined(__cplusplus)
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
/** \defgroup avi AVI - Windows Audio-Video Interleaved RIFF
|
15
|
+
* \section Description
|
16
|
+
*
|
17
|
+
* \par
|
18
|
+
* Windows Copyright Microsoft Corporation.
|
19
|
+
* \par
|
20
|
+
* Access to the AVI format uses Windows AVIFile library. Available in Windows Only. \n
|
21
|
+
* When writing a new file you must use an ".avi" extension, or the Windows API will fail. \n
|
22
|
+
* You must link the application with "im_avi.lib"
|
23
|
+
* and you must call the function \ref imFormatRegisterAVI once
|
24
|
+
* to register the format into the IM core library. \n
|
25
|
+
* Depends also on the VFW library (vfw32.lib).
|
26
|
+
* When using the "im_avi.dll" this extra library is not necessary. \n
|
27
|
+
* If using Cygwin or MingW must link with "-lvfw32".
|
28
|
+
* Old versions of Cygwin and MingW use the "-lvfw_ms32" and "-lvfw_avi32".
|
29
|
+
* \par
|
30
|
+
* See \ref im_format_avi.h
|
31
|
+
*
|
32
|
+
* \section Features
|
33
|
+
*
|
34
|
+
\verbatim
|
35
|
+
Data Types: Byte
|
36
|
+
Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
|
37
|
+
Compressions (installed in Windows XP by default):
|
38
|
+
NONE - no compression [default]
|
39
|
+
RLE - Microsoft RLE (8bpp only)
|
40
|
+
CINEPACK - Cinepak Codec by Radius
|
41
|
+
MSVC - Microsoft Video 1 (old)
|
42
|
+
M261 - Microsoft H.261 Video Codec
|
43
|
+
M263 - Microsoft H.263 Video Codec
|
44
|
+
I420 - Intel 4:2:0 Video Codec (same as M263)
|
45
|
+
IV32 - Intel Indeo Video Codec 3.2 (old)
|
46
|
+
IV41 - Intel Indeo Video Codec 4.5 (old)
|
47
|
+
IV50 - Intel Indeo Video 5.1
|
48
|
+
IYUV - Intel IYUV Codec
|
49
|
+
MPG4 - Microsoft MPEG-4 Video Codec V1 (not MPEG-4 compliant) (old)
|
50
|
+
MP42 - Microsoft MPEG-4 Video Codec V2 (not MPEG-4 compliant)
|
51
|
+
CUSTOM - (show compression dialog)
|
52
|
+
DIVX - DivX 5.0.4 Codec (DivX must be installed)
|
53
|
+
(others, must be the 4 charaters of the fourfcc code)
|
54
|
+
Can have more than one image.
|
55
|
+
Can have an alpha channel (only for RGB)
|
56
|
+
Internally the components are always packed.
|
57
|
+
Lines arranged from top down to bottom or bottom up to top. But are saved always as bottom up.
|
58
|
+
Handle(0) returns NULL. imBinFile is not supported.
|
59
|
+
Handle(1) returns PAVIFILE.
|
60
|
+
Handle(2) returns PAVISTREAM.
|
61
|
+
|
62
|
+
Attributes:
|
63
|
+
FPS IM_FLOAT (1) (should set when writing, default 15)
|
64
|
+
AVIQuality IM_INT (1) [1-10000, default -1] (write only)
|
65
|
+
KeyFrameRate IM_INT (1) (write only) [key frame frequency, if 0 not using key frames, default 15]
|
66
|
+
DataRate IM_INT (1) (write only) [kilobits/second, default 2400]
|
67
|
+
|
68
|
+
Comments:
|
69
|
+
Reads only the first video stream. Other streams are ignored.
|
70
|
+
All the images have the same size, you must call imFileReadImageInfo/imFileWriteImageInfo
|
71
|
+
at least once.
|
72
|
+
For codecs comparsion and download go to:
|
73
|
+
http://graphics.lcs.mit.edu/~tbuehler/video/codecs/
|
74
|
+
http://www.fourcc.org
|
75
|
+
\endverbatim
|
76
|
+
* \ingroup format */
|
77
|
+
|
78
|
+
/** Register the AVI Format. \n
|
79
|
+
* In Lua, when using require"imlua_avi" this function will be automatically called.
|
80
|
+
* \ingroup avi */
|
81
|
+
void imFormatRegisterAVI(void);
|
82
|
+
|
83
|
+
#if defined(__cplusplus)
|
84
|
+
}
|
85
|
+
#endif
|
86
|
+
|
87
|
+
#endif
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/** \file
|
2
|
+
* \brief Register the ECW Format
|
3
|
+
*
|
4
|
+
* See Copyright Notice in im_lib.h
|
5
|
+
*/
|
6
|
+
|
7
|
+
#ifndef __IM_FORMAT_ECW_H
|
8
|
+
#define __IM_FORMAT_ECW_H
|
9
|
+
|
10
|
+
#if defined(__cplusplus)
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
/** \defgroup ecw ECW - ECW JPEG 2000
|
15
|
+
* \section Description
|
16
|
+
*
|
17
|
+
* \par
|
18
|
+
* ECW JPEG 2000 Copyright 1998 Earth Resource Mapping Ltd.
|
19
|
+
* Two formats are supported with this module. The ECW (Enhanced Compression Wavelet) format and the ISO JPEG 2000 format.
|
20
|
+
* \par
|
21
|
+
* Access to the ECW format uses the ECW JPEG 2000 SDK version 3.3.
|
22
|
+
* Available in Windows, Linux and Solaris Only. But source code is also available. \n
|
23
|
+
* You must link the application with "im_ecw.lib"
|
24
|
+
* and you must call the function \ref imFormatRegisterECW once
|
25
|
+
* to register the format into the IM core library. \n
|
26
|
+
* Depends also on the ECW JPEG 2000 SDK libraries (NCSEcw.lib).
|
27
|
+
* \par
|
28
|
+
* When using other JPEG 2000 libraries the first registered library will be used to guess the file format.
|
29
|
+
* Use the extension *.ecw to shortcut to this implementation of the JPEG 2000 format.
|
30
|
+
* \par
|
31
|
+
* See \ref im_format_ecw.h
|
32
|
+
* \par
|
33
|
+
* \par
|
34
|
+
* http://www.ermapper.com/ecw/ \n
|
35
|
+
* The three types of licenses available for the ECW JPEG 2000 SDK are as follows:
|
36
|
+
\verbatim
|
37
|
+
- ECW JPEG 2000 SDK Free Use License Agreement - This license governs the free use of
|
38
|
+
the ECW JPEG 2000 SDK with Unlimited Decompression and Limited Compression (Less
|
39
|
+
than 500MB).
|
40
|
+
- ECW JPEG 2000 SDK Public Use License Agreement - This license governs the use of the
|
41
|
+
ECW SDK with Unlimited Decompression and Unlimited Compression for applications
|
42
|
+
licensed under a GNU General Public style license.
|
43
|
+
- ECW JPEG 2000 SDK Commercial Use License Agreement - This license governs the use
|
44
|
+
of the ECW JPEG 2000 SDK with Unlimited Decompression and Unlimited Compression
|
45
|
+
for commercial applications.
|
46
|
+
\endverbatim
|
47
|
+
*
|
48
|
+
* \section Features
|
49
|
+
*
|
50
|
+
\verbatim
|
51
|
+
Data Types: Byte, UShort, Float
|
52
|
+
Color Spaces: BINARY, GRAY, RGB, YCBCR
|
53
|
+
Compressions:
|
54
|
+
ECW - Enhanced Compression Wavelet
|
55
|
+
JPEG-2000 - ISO JPEG 2000
|
56
|
+
Only one image.
|
57
|
+
Can have an alpha channel
|
58
|
+
Internally the components are always packed.
|
59
|
+
Lines arranged from top down to bottom.
|
60
|
+
Handle() returns NCSFileView* when reading, NCSEcwCompressClient* when writing.
|
61
|
+
|
62
|
+
Attributes:
|
63
|
+
CompressionRatio IM_FLOAT (1) [example: Ratio=7 just like 7:1]
|
64
|
+
OriginX, OriginY IM_FLOAT (1)
|
65
|
+
Rotation IM_FLOAT (1)
|
66
|
+
CellIncrementX, CellIncrementY IM_FLOAT (1)
|
67
|
+
CellUnits (string)
|
68
|
+
Datum (string)
|
69
|
+
Projection (string)
|
70
|
+
ViewWidth, ViewHeight IM_INT (1) [view zoom]
|
71
|
+
ViewXmin, ViewYmin, ViewXmax, ViewYmax IM_INT (1) [view limits]
|
72
|
+
MultiBandCount IM_USHORT (1) [Number of bands in a multiband gray image.]
|
73
|
+
MultiBandSelect IM_USHORT (1) [Band number to read one band of a multiband gray image. Must be set before reading image info.]
|
74
|
+
|
75
|
+
Comments:
|
76
|
+
Only read support is implemented.
|
77
|
+
To read a region of the image you must set the View* attributes before reading the image data.
|
78
|
+
After reading a partial image the width and height returned in ReadImageInfo is the view size.
|
79
|
+
The view limits define the region to be readed.
|
80
|
+
The view size is the actual size of the image, so the result can be zoomed.
|
81
|
+
\endverbatim
|
82
|
+
* \ingroup format */
|
83
|
+
|
84
|
+
/** Register the ECW Format
|
85
|
+
* \ingroup ecw */
|
86
|
+
void imFormatRegisterECW(void);
|
87
|
+
|
88
|
+
|
89
|
+
#if defined(__cplusplus)
|
90
|
+
}
|
91
|
+
#endif
|
92
|
+
|
93
|
+
#endif
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/** \file
|
2
|
+
* \brief Register the JP2 Format
|
3
|
+
*
|
4
|
+
* See Copyright Notice in im_lib.h
|
5
|
+
*/
|
6
|
+
|
7
|
+
#ifndef __IM_FORMAT_JP2_H
|
8
|
+
#define __IM_FORMAT_JP2_H
|
9
|
+
|
10
|
+
#if defined(__cplusplus)
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
|
15
|
+
/** \defgroup jp2 JP2 - JPEG-2000 JP2 File Format
|
16
|
+
* \section Description
|
17
|
+
*
|
18
|
+
* \par
|
19
|
+
* ISO/IEC 15444 (2000, 2003)\n
|
20
|
+
* http://www.jpeg.org/
|
21
|
+
* \par
|
22
|
+
* You must link the application with "im_jp2.lib"
|
23
|
+
* and you must call the function \ref imFormatRegisterJP2 once
|
24
|
+
* to register the format into the IM core library. \n
|
25
|
+
* \par
|
26
|
+
* Access to the JPEG2000 file format uses libJasper version 1.900.1 \n
|
27
|
+
* http://www.ece.uvic.ca/~mdadams/jasper \n
|
28
|
+
* Copyright (c) 2001-2006 Michael David Adams. \n
|
29
|
+
* and GeoJasPer 1.4.0 \n
|
30
|
+
* Copyright (c) 2003-2007 Dmitry V. Fedorov. \n
|
31
|
+
* http://www.dimin.net/software/geojasper/ \n
|
32
|
+
*
|
33
|
+
* \par
|
34
|
+
* See \ref im_format_jp2.h
|
35
|
+
*
|
36
|
+
* \section Features
|
37
|
+
*
|
38
|
+
\verbatim
|
39
|
+
Data Types: Byte and UShort
|
40
|
+
Color Spaces: Binary, Gray, RGB, YCbCr, Lab and XYZ
|
41
|
+
Compressions:
|
42
|
+
JPEG-2000 - ISO JPEG 2000 [default]
|
43
|
+
Only one image.
|
44
|
+
Can have an alpha channel.
|
45
|
+
Internally the components are always unpacked.
|
46
|
+
Internally the lines are arranged from top down to bottom.
|
47
|
+
Handle(1) returns jas_image_t*
|
48
|
+
Handle(2) returns jas_stream_t*
|
49
|
+
|
50
|
+
Attributes:
|
51
|
+
CompressionRatio IM_FLOAT (1) [write only, example: Ratio=7 just like 7:1]
|
52
|
+
GeoTIFFBox IM_BYTE (n)
|
53
|
+
XMLPacket IM_BYTE (n)
|
54
|
+
|
55
|
+
Comments:
|
56
|
+
We read code stream syntax and JP2, but we write always as JP2.
|
57
|
+
Used definitions EXCLUDE_JPG_SUPPORT,EXCLUDE_MIF_SUPPORT,
|
58
|
+
EXCLUDE_PNM_SUPPORT,EXCLUDE_RAS_SUPPORT,
|
59
|
+
EXCLUDE_BMP_SUPPORT,EXCLUDE_PGX_SUPPORT
|
60
|
+
Changed jas_config.h to match our needs.
|
61
|
+
New file jas_binfile.c
|
62
|
+
Changed base/jas_stream.c to export jas_stream_create and jas_stream_initbuf.
|
63
|
+
Changed jp2/jp2_dec.c and jpc/jpc_cs.c to remove "uint" and "ulong" usage.
|
64
|
+
The counter is restarted many times, because it has many phases.
|
65
|
+
\endverbatim
|
66
|
+
* \ingroup format */
|
67
|
+
|
68
|
+
/** Register the JP2 Format. \n
|
69
|
+
* In Lua, when using require"imlua_jp2" this function will be automatically called.
|
70
|
+
* \ingroup jp2 */
|
71
|
+
void imFormatRegisterJP2(void);
|
72
|
+
|
73
|
+
|
74
|
+
#if defined(__cplusplus)
|
75
|
+
}
|
76
|
+
#endif
|
77
|
+
|
78
|
+
#endif
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/** \file
|
2
|
+
* \brief Initialize the RAW Format Driver
|
3
|
+
* Header for internal use only.
|
4
|
+
*
|
5
|
+
* See Copyright Notice in im_lib.h
|
6
|
+
*/
|
7
|
+
|
8
|
+
#ifndef __IM_FORMAT_RAW_H
|
9
|
+
#define __IM_FORMAT_RAW_H
|
10
|
+
|
11
|
+
#if defined(__cplusplus)
|
12
|
+
extern "C" {
|
13
|
+
#endif
|
14
|
+
|
15
|
+
/** \defgroup raw RAW - RAW File
|
16
|
+
*
|
17
|
+
* \par
|
18
|
+
* The file must be open/created with the functions \ref imFileOpenRaw and \ref imFileNewRaw.
|
19
|
+
*
|
20
|
+
* \section Description
|
21
|
+
*
|
22
|
+
* \par
|
23
|
+
* Internal Implementation.
|
24
|
+
* \par
|
25
|
+
* Supports RAW binary images. You must know image parameters a priori. \n
|
26
|
+
* You must set the IM_INT attributes "Width", "Height", "ColorMode", "DataType" before the imFileReadImageInfo/imFileWriteImageInfo functions.
|
27
|
+
* \par
|
28
|
+
* The data must be in binary form, but can start in an arbitrary offset from the begining of the file, use attribute "StartOffset".
|
29
|
+
* The default is at 0 offset.
|
30
|
+
* \par
|
31
|
+
* Integer sign and double precision can be converted using attribute "SwitchType". \n
|
32
|
+
* The conversions will be BYTE<->CHAR, USHORT<->SHORT, INT<->UINT, FLOAT<->DOUBLE.
|
33
|
+
* \par
|
34
|
+
* Byte Order can be Little Endian (Intel=1) or Big Endian (Motorola=0), use the attribute "ByteOrder", the default is the current CPU.
|
35
|
+
* \par
|
36
|
+
* The lines can be aligned to a BYTE (1), WORD (2) or DWORD (4) boundaries, ue attribute "Padding" with the respective value.
|
37
|
+
* \par
|
38
|
+
* See \ref im_raw.h
|
39
|
+
*
|
40
|
+
* \section Features
|
41
|
+
*
|
42
|
+
\verbatim
|
43
|
+
Data Types: <all>
|
44
|
+
Color Spaces: all, except MAP.
|
45
|
+
Compressions:
|
46
|
+
NONE - no compression
|
47
|
+
Can have more than one image, depends on "StartOffset" attribute.
|
48
|
+
Can have an alpha channel.
|
49
|
+
Components can be packed or not.
|
50
|
+
Lines arranged from top down to bottom or bottom up to top.
|
51
|
+
|
52
|
+
Attributes:
|
53
|
+
Width, Height, ColorMode, DataType IM_INT (1)
|
54
|
+
StartOffset, SwitchType, ByteOrder, Padding IM_INT (1)
|
55
|
+
\endverbatim
|
56
|
+
* \ingroup format */
|
57
|
+
imFormat* imFormatInitRAW(void);
|
58
|
+
|
59
|
+
|
60
|
+
#if defined(__cplusplus)
|
61
|
+
}
|
62
|
+
#endif
|
63
|
+
|
64
|
+
#endif
|
@@ -0,0 +1,100 @@
|
|
1
|
+
/** \file
|
2
|
+
* \brief Register the WMF Format
|
3
|
+
*
|
4
|
+
* See Copyright Notice in im_lib.h
|
5
|
+
*/
|
6
|
+
|
7
|
+
#ifndef __IM_FORMAT_WMV_H
|
8
|
+
#define __IM_FORMAT_WMV_H
|
9
|
+
|
10
|
+
#if defined(__cplusplus)
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
/** \defgroup wmv WMV - Windows Media Video Format
|
15
|
+
* \section Description
|
16
|
+
*
|
17
|
+
* \par
|
18
|
+
* Advanced Systems Format (ASF) \n
|
19
|
+
* Windows Copyright Microsoft Corporation.
|
20
|
+
* \par
|
21
|
+
* Access to the WMV format uses Windows Media SDK. Available in Windows Only. \n
|
22
|
+
* You must link the application with "im_wmv.lib"
|
23
|
+
* and you must call the function \ref imFormatRegisterWMV once
|
24
|
+
* to register the format into the IM core library. \n
|
25
|
+
* Depends also on the WMF SDK (wmvcore.lib).
|
26
|
+
* When using the "im_wmv.dll" this extra library is not necessary.
|
27
|
+
* \par
|
28
|
+
* The application users should have the WMV codec 9 installed:
|
29
|
+
* http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx
|
30
|
+
* \par
|
31
|
+
* You must agree with the WMF SDK EULA to use the SDK. \n
|
32
|
+
* http://wmlicense.smdisp.net/v9sdk/
|
33
|
+
* \par
|
34
|
+
* For more information: \n
|
35
|
+
* http://www.microsoft.com/windows/windowsmedia/9series/sdk.aspx \n
|
36
|
+
* http://msdn.microsoft.com/library/en-us/wmform/htm/introducingwindowsmediaformat.asp
|
37
|
+
* \par
|
38
|
+
* See \ref im_format_wmv.h
|
39
|
+
*
|
40
|
+
* \section Features
|
41
|
+
*
|
42
|
+
\verbatim
|
43
|
+
Data Types: Byte
|
44
|
+
Color Spaces: RGB and MAP (Gray and Binary saved as MAP)
|
45
|
+
Compressions (installed in Windows XP by default):
|
46
|
+
NONE - no compression
|
47
|
+
MPEG-4v3 - Windows Media MPEG-4 Video V3
|
48
|
+
MPEG-4v1 - ISO MPEG-4 Video V1
|
49
|
+
WMV7 - Windows Media Video V7
|
50
|
+
WMV7Screen - Windows Media Screen V7
|
51
|
+
WMV8 - Windows Media Video V8
|
52
|
+
WMV9Screen - Windows Media Video 9 Screen
|
53
|
+
WMV9 - Windows Media Video 9 [default]
|
54
|
+
Unknown - Others
|
55
|
+
Can have more than one image.
|
56
|
+
Can have an alpha channel (only for RGB) ?
|
57
|
+
Internally the components are always packed.
|
58
|
+
Lines arranged from top down to bottom or bottom up to top.
|
59
|
+
Handle(0) return NULL. imBinFile is not supported.
|
60
|
+
Handle(1) returns IWMSyncReader* when reading, IWMWriter* when writing.
|
61
|
+
|
62
|
+
Attributes:
|
63
|
+
FPS IM_FLOAT (1) (should set when writing, default 15)
|
64
|
+
WMFQuality IM_INT (1) [0-100, default 50] (write only)
|
65
|
+
MaxKeyFrameTime IM_INT (1) (write only) [maximum key frame interval in miliseconds, default 5 seconds]
|
66
|
+
DataRate IM_INT (1) (write only) [kilobits/second, default 2400]
|
67
|
+
VBR IM_INT (1) [0, 1] (write only) [0 - Constant Bit Rate (default), 1 - Variable Bit Rate (Quality-Based)]
|
68
|
+
(and several others from the file-level attributes) For ex:
|
69
|
+
Title, Author, Copyright, Description (string)
|
70
|
+
Duration IM_INT [100-nanosecond units]
|
71
|
+
Seekable, HasAudio, HasVideo, Is_Protected, Is_Trusted, IsVBR IM_INT (1) [0, 1]
|
72
|
+
NumberOfFrames IM_INT (1)
|
73
|
+
|
74
|
+
Comments:
|
75
|
+
IMPORTANT - The "image_count" and the "FPS" attribute may not be available from the file,
|
76
|
+
we try to estimate from the duration and from the average time between frames, or using the default value.
|
77
|
+
We do not handle DRM protected files (Digital Rights Management).
|
78
|
+
Reads only the first video stream. Other streams are ignored.
|
79
|
+
All the images have the same size, you must call imFileReadImageInfo/imFileWriteImageInfo
|
80
|
+
at least once.
|
81
|
+
For optimal random reading, the file should be indexed previously.
|
82
|
+
If not indexed by frame, random positioning may not be precise.
|
83
|
+
Sequencial reading will always be precise.
|
84
|
+
When writing we use a custom profile and time indexing only.
|
85
|
+
We do not support multipass encoding.
|
86
|
+
Since the driver uses COM, CoInitialize(NULL) and CoUninitialize() are called every Open/Close.
|
87
|
+
\endverbatim
|
88
|
+
* \ingroup format */
|
89
|
+
|
90
|
+
/** Register the WMF Format. \n
|
91
|
+
* In Lua, when using require"imlua_wmv" this function will be automatically called.
|
92
|
+
* \ingroup wmv */
|
93
|
+
void imFormatRegisterWMV(void);
|
94
|
+
|
95
|
+
|
96
|
+
#if defined(__cplusplus)
|
97
|
+
}
|
98
|
+
#endif
|
99
|
+
|
100
|
+
#endif
|
@@ -0,0 +1,403 @@
|
|
1
|
+
/** \file
|
2
|
+
* \brief Image Manipulation
|
3
|
+
*
|
4
|
+
* See Copyright Notice in im_lib.h
|
5
|
+
*/
|
6
|
+
|
7
|
+
#ifndef __IM_IMAGE_H
|
8
|
+
#define __IM_IMAGE_H
|
9
|
+
|
10
|
+
#if defined(__cplusplus)
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
|
15
|
+
/** \defgroup imgclass imImage
|
16
|
+
*
|
17
|
+
* \par
|
18
|
+
* Base definitions and functions for image representation. \n
|
19
|
+
* Only the image processing operations depends on these definitions,
|
20
|
+
* Image Storage and Image Capture are completely independent.
|
21
|
+
* \par
|
22
|
+
* You can also initialize a structure with your own memory buffer, see \ref imImageInit.
|
23
|
+
* To release the structure without releasing the buffer,
|
24
|
+
* set "data[0]" to NULL before calling imImageDestroy.
|
25
|
+
* \par
|
26
|
+
* See \ref im_image.h
|
27
|
+
* \ingroup imagerep */
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
/** \brief imImage Structure Definition.
|
32
|
+
*
|
33
|
+
* \par
|
34
|
+
* An image representation than supports all the color spaces,
|
35
|
+
* but planes are always unpacked and the orientation is always bottom up.
|
36
|
+
* \ingroup imgclass */
|
37
|
+
typedef struct _imImage
|
38
|
+
{
|
39
|
+
/* main parameters */
|
40
|
+
int width; /**< Number of columns. image:Width() -> width: number [in Lua 5]. */
|
41
|
+
int height; /**< Number of lines. image:Height() -> height: number [in Lua 5]. */
|
42
|
+
int color_space; /**< Color space descriptor. See also \ref imColorSpace. image:ColorSpace() -> color_space: number [in Lua 5]. */
|
43
|
+
int data_type; /**< Data type descriptor. See also \ref imDataType. image:DataType() -> data_type: number [in Lua 5]. */
|
44
|
+
int has_alpha; /**< Indicates that there is an extra channel with alpha. image:HasAlpha() -> has_alpha: number [in Lua 5]. \n
|
45
|
+
It will not affect the secondary parameters, i.e. the number of planes will be in fact depth+1. \n
|
46
|
+
It is always 0 unless imImageAddAlpha is called, this is done in image load functions. */
|
47
|
+
|
48
|
+
/* secondary parameters */
|
49
|
+
int depth; /**< Number of planes (ColorSpaceDepth) */
|
50
|
+
int line_size; /**< Number of bytes per line in one plane (width * DataTypeSize) */
|
51
|
+
int plane_size; /**< Number of bytes per plane. (line_size * height) */
|
52
|
+
int size; /**< Number of bytes occupied by the image (plane_size * depth) */
|
53
|
+
int count; /**< Number of pixels (width * height) */
|
54
|
+
|
55
|
+
/* image data */
|
56
|
+
void** data; /**< Image data organized as a 2D matrix with several planes. \n
|
57
|
+
But plane 0 is also a pointer to the full data. \n
|
58
|
+
The remaining planes are: data[i] = data[0] + i*plane_size \n
|
59
|
+
In Lua, data indexing is possible using: image[plane][row][column] */
|
60
|
+
|
61
|
+
/* image attributes */
|
62
|
+
long *palette; /**< Color palette. image:GetPalette() -> palette: imPalette [in Lua 5]. \n
|
63
|
+
Used when depth=1. Otherwise is NULL. */
|
64
|
+
int palette_count; /**< The palette is always 256 colors allocated, but can have less colors used. */
|
65
|
+
|
66
|
+
void* attrib_table; /**< in fact is an imAttribTable, but we hide this here */
|
67
|
+
} imImage;
|
68
|
+
|
69
|
+
|
70
|
+
/** Creates a new image.
|
71
|
+
* See also \ref imDataType and \ref imColorSpace. \n
|
72
|
+
* In Lua the IM image metatable name is "imImage".
|
73
|
+
* When converted to a string will return "imImage(%p) [width=%d,height=%d,color_space=%s,data_type=%s,depth=%d]" where %p is replaced by the userdata address,
|
74
|
+
* and other values are replaced by the respective attributes.
|
75
|
+
* If the image is already destroyed by im.ImageDestroy, then it will return also the suffix "-destroyed".
|
76
|
+
*
|
77
|
+
* \verbatim im.ImageCreate(width: number, height: number, color_space: number, data_type: number) -> image: imImage [in Lua 5] \endverbatim
|
78
|
+
* \ingroup imgclass */
|
79
|
+
imImage* imImageCreate(int width, int height, int color_space, int data_type);
|
80
|
+
|
81
|
+
/** Initializes the image structure but does not allocates image data.
|
82
|
+
* See also \ref imDataType and \ref imColorSpace.
|
83
|
+
* \ingroup imgclass */
|
84
|
+
imImage* imImageInit(int width, int height, int color_space, int data_type, void* data_buffer, long* palette, int palette_count);
|
85
|
+
|
86
|
+
/** Creates a new image based on an existing one. \n
|
87
|
+
* If the addicional parameters are -1, the given image parameters are used. \n
|
88
|
+
* The image atributes always are copied.
|
89
|
+
* See also \ref imDataType and \ref imColorSpace.
|
90
|
+
*
|
91
|
+
* \verbatim im.ImageCreateBased(image: imImage, [width: number], [height: number], [color_space: number], [data_type: number]) -> image: imImage [in Lua 5] \endverbatim
|
92
|
+
* The addicional parameters in Lua can be nil,
|
93
|
+
* and they can also be functions with the based image as a parameter to return the respective value.
|
94
|
+
* \ingroup imgclass */
|
95
|
+
imImage* imImageCreateBased(const imImage* image, int width, int height, int color_space, int data_type);
|
96
|
+
|
97
|
+
/** Destroys the image and frees the memory used.
|
98
|
+
* image data is destroyed only if its data[0] is not NULL. \n
|
99
|
+
* In Lua if this function is not called, the image is destroyed by the garbage collector.
|
100
|
+
*
|
101
|
+
* \verbatim im.ImageDestroy(image: imImage) [in Lua 5] \endverbatim
|
102
|
+
* \verbatim image:Destroy() [in Lua 5] \endverbatim
|
103
|
+
* \ingroup imgclass */
|
104
|
+
void imImageDestroy(imImage* image);
|
105
|
+
|
106
|
+
/** Adds an alpha channel plane.
|
107
|
+
*
|
108
|
+
* \verbatim image:AddAlpha() [in Lua 5] \endverbatim
|
109
|
+
* \ingroup imgclass */
|
110
|
+
void imImageAddAlpha(imImage* image);
|
111
|
+
|
112
|
+
/** Changes the buffer size. Reallocate internal buffers if the new size is larger than the original.
|
113
|
+
*
|
114
|
+
* \verbatim image:Reshape(width: number, height: number) [in Lua 5] \endverbatim
|
115
|
+
* \ingroup imgclass */
|
116
|
+
void imImageReshape(imImage* image, int width, int height);
|
117
|
+
|
118
|
+
/** Copy image data and attributes from one image to another. \n
|
119
|
+
* Images must have the same size and type.
|
120
|
+
*
|
121
|
+
* \verbatim image:Copy(dst_image: imImage) [in Lua 5] \endverbatim
|
122
|
+
* \ingroup imgclass */
|
123
|
+
void imImageCopy(const imImage* src_image, imImage* dst_image);
|
124
|
+
|
125
|
+
/** Copy image data only fom one image to another. \n
|
126
|
+
* Images must have the same size and type.
|
127
|
+
*
|
128
|
+
* \verbatim image:CopyData(dst_image: imImage) [in Lua 5] \endverbatim
|
129
|
+
* \ingroup imgclass */
|
130
|
+
void imImageCopyData(const imImage* src_image, imImage* dst_image);
|
131
|
+
|
132
|
+
/** Creates a copy of the image.
|
133
|
+
*
|
134
|
+
* \verbatim image:Duplicate() -> new_image: imImage [in Lua 5] \endverbatim
|
135
|
+
* \ingroup imgclass */
|
136
|
+
imImage* imImageDuplicate(const imImage* image);
|
137
|
+
|
138
|
+
/** Creates a clone of the image. i.e. same attributes but ignore contents.
|
139
|
+
*
|
140
|
+
* \verbatim image:Clone() -> new_image: imImage [in Lua 5] \endverbatim
|
141
|
+
* \ingroup imgclass */
|
142
|
+
imImage* imImageClone(const imImage* image);
|
143
|
+
|
144
|
+
/** Changes an extended attribute. \n
|
145
|
+
* The data will be internally duplicated. \n
|
146
|
+
* If data is NULL the attribute is removed. \n
|
147
|
+
* If count is -1 and data_type is IM_BYTE then data is zero terminated.
|
148
|
+
* See also \ref imDataType.
|
149
|
+
*
|
150
|
+
* \verbatim image:SetAttribute(attrib: string, data_type: number, data: table of numbers or string) [in Lua 5] \endverbatim
|
151
|
+
* If data_type is IM_BYTE, as_string can be used as data.
|
152
|
+
* \ingroup imgclass */
|
153
|
+
void imImageSetAttribute(imImage* image, const char* attrib, int data_type, int count, const void* data);
|
154
|
+
|
155
|
+
/** Returns an extended attribute. \n
|
156
|
+
* Returns NULL if not found.
|
157
|
+
* See also \ref imDataType.
|
158
|
+
*
|
159
|
+
* \verbatim image:GetAttribute(attrib: string, [as_string: boolean]) -> data: table of numbers or string, data_type: number [in Lua 5] \endverbatim
|
160
|
+
* If data_type is IM_BYTE, as_string can be used to return a string instead of a table.
|
161
|
+
* \ingroup imgclass */
|
162
|
+
const void* imImageGetAttribute(const imImage* image, const char* attrib, int *data_type, int *count);
|
163
|
+
|
164
|
+
/** Returns a list of the attribute names. \n
|
165
|
+
* "attrib" must contain room enough for "attrib_count" names. Use "attrib=NULL" to return only the count.
|
166
|
+
*
|
167
|
+
* \verbatim image:GetAttributeList() -> data: table of strings [in Lua 5] \endverbatim
|
168
|
+
* \ingroup imgclass */
|
169
|
+
void imImageGetAttributeList(const imImage* image, char** attrib, int *attrib_count);
|
170
|
+
|
171
|
+
/** Sets all image data to zero.
|
172
|
+
*
|
173
|
+
* \verbatim image:Clear() [in Lua 5] \endverbatim
|
174
|
+
* \ingroup imgclass */
|
175
|
+
void imImageClear(imImage* image);
|
176
|
+
|
177
|
+
/** Indicates that the image can be viewed in common graphic devices.
|
178
|
+
* Data type must be IM_BYTE. Color mode can be IM_RGB, IM_MAP, IM_GRAY or IM_BINARY.
|
179
|
+
*
|
180
|
+
* \verbatim image:IsBitmap() -> is_bitmap: boolean [in Lua 5] \endverbatim
|
181
|
+
* \ingroup imgclass */
|
182
|
+
int imImageIsBitmap(const imImage* image);
|
183
|
+
|
184
|
+
/** Changes the image palette.
|
185
|
+
* This will destroy the existing palette and replace it with the given palette buffer.
|
186
|
+
*
|
187
|
+
* \verbatim image:SetPalette(palette: imPalette) [in Lua 5] \endverbatim
|
188
|
+
* \ingroup imgclass */
|
189
|
+
void imImageSetPalette(imImage* image, long* palette, int palette_count);
|
190
|
+
|
191
|
+
/** Copies the image attributes from src to dst.
|
192
|
+
*
|
193
|
+
* \verbatim image:CopyAttributes(dst_image: imImage) [in Lua 5] \endverbatim
|
194
|
+
* \ingroup imgclass */
|
195
|
+
void imImageCopyAttributes(const imImage* src_image, imImage* dst_image);
|
196
|
+
|
197
|
+
/** Returns 1 if the images match width and height. Returns 0 otherwise.
|
198
|
+
*
|
199
|
+
* \verbatim image:MatchSize(image2: imImage) -> match: boolean [in Lua 5] \endverbatim
|
200
|
+
* \ingroup imgclass */
|
201
|
+
int imImageMatchSize(const imImage* image1, const imImage* image2);
|
202
|
+
|
203
|
+
/** Returns 1 if the images match color mode and data type. Returns 0 otherwise.
|
204
|
+
*
|
205
|
+
* \verbatim image:MatchColor(image2: imImage) -> match: boolean [in Lua 5] \endverbatim
|
206
|
+
* \ingroup imgclass */
|
207
|
+
int imImageMatchColor(const imImage* image1, const imImage* image2);
|
208
|
+
|
209
|
+
/** Returns 1 if the images match width, height and data type. Returns 0 otherwise.
|
210
|
+
*
|
211
|
+
* \verbatim image:MatchDataType(image2: imImage) -> match: boolean [in Lua 5] \endverbatim
|
212
|
+
* \ingroup imgclass */
|
213
|
+
int imImageMatchDataType(const imImage* image1, const imImage* image2);
|
214
|
+
|
215
|
+
/** Returns 1 if the images match width, height and color space. Returns 0 otherwise.
|
216
|
+
*
|
217
|
+
* \verbatim image:MatchColorSpace(image2: imImage) -> match: boolean [in Lua 5] \endverbatim
|
218
|
+
* \ingroup imgclass */
|
219
|
+
int imImageMatchColorSpace(const imImage* image1, const imImage* image2);
|
220
|
+
|
221
|
+
/** Returns 1 if the images match in width, height, data type and color space. Returns 0 otherwise.
|
222
|
+
*
|
223
|
+
* \verbatim image:Match(image2: imImage) -> match: boolean [in Lua 5] \endverbatim
|
224
|
+
* \ingroup imgclass */
|
225
|
+
int imImageMatch(const imImage* image1, const imImage* image2);
|
226
|
+
|
227
|
+
/** Changes the image space from gray to binary by just changing color_space and the palette.
|
228
|
+
*
|
229
|
+
* \verbatim image:SetBinary() [in Lua 5] \endverbatim
|
230
|
+
* \ingroup imgclass */
|
231
|
+
void imImageSetBinary(imImage* image);
|
232
|
+
|
233
|
+
/** Changes a gray data into a binary data, done in-place.
|
234
|
+
*
|
235
|
+
* \verbatim image:MakeBinary() [in Lua 5] \endverbatim
|
236
|
+
* \ingroup imgclass */
|
237
|
+
void imImageMakeBinary(imImage *image);
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
/** \defgroup imgfile imImage Storage
|
242
|
+
*
|
243
|
+
* \par
|
244
|
+
* Functions to simplify the process of reading and writting imImage structures.
|
245
|
+
* Will also load and save the alpha planes when possible.
|
246
|
+
* \par
|
247
|
+
* See \ref im_image.h
|
248
|
+
* \ingroup file */
|
249
|
+
|
250
|
+
|
251
|
+
/** Loads an image from an already open file. Returns NULL if failed. \n
|
252
|
+
* This will call \ref imFileReadImageInfo and \ref imFileReadImageData. \n
|
253
|
+
* index specifies the image number between 0 and image_count-1. \n
|
254
|
+
* The returned image will be of the same color_space and data_type of the image in the file. \n
|
255
|
+
* Attributes from the file will be stored at the image.
|
256
|
+
* See also \ref imErrorCodes.
|
257
|
+
*
|
258
|
+
* \verbatim ifile:LoadImage([index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim
|
259
|
+
* Default index is 0.
|
260
|
+
* \ingroup imgfile */
|
261
|
+
imImage* imFileLoadImage(imFile* ifile, int index, int *error);
|
262
|
+
|
263
|
+
/** Loads an image from an already open file. Returns NULL if failed. \n
|
264
|
+
* This function assumes that the image in the file has the same parameters as the given image. \n
|
265
|
+
* This will call \ref imFileReadImageInfo and \ref imFileReadImageData. \n
|
266
|
+
* index specifies the image number between 0 and image_count-1. \n
|
267
|
+
* The returned image will be of the same color_space and data_type of the image in the file. \n
|
268
|
+
* Attributes from the file will be stored at the image.
|
269
|
+
* See also \ref imErrorCodes.
|
270
|
+
*
|
271
|
+
* \verbatim ifile:LoadImageFrame(index: number, image: imImage) -> error: number [in Lua 5] \endverbatim
|
272
|
+
* Default index is 0.
|
273
|
+
* \ingroup imgfile */
|
274
|
+
void imFileLoadImageFrame(imFile* ifile, int index, imImage* image, int *error);
|
275
|
+
|
276
|
+
/** Loads an image from an already open file, but forces the image to be a bitmap.\n
|
277
|
+
* The returned imagem will be always a Bitmap image, with color_space RGB, MAP, GRAY or BINARY, and data_type IM_BYTE. \n
|
278
|
+
* index specifies the image number between 0 and image_count-1. \n
|
279
|
+
* Returns NULL if failed.
|
280
|
+
* Attributes from the file will be stored at the image.
|
281
|
+
* See also \ref imErrorCodes.
|
282
|
+
*
|
283
|
+
* \verbatim ifile:LoadBitmap([index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim
|
284
|
+
* Default index is 0.
|
285
|
+
* \ingroup imgfile */
|
286
|
+
imImage* imFileLoadBitmap(imFile* ifile, int index, int *error);
|
287
|
+
|
288
|
+
/** Loads an image region from an already open file. Returns NULL if failed. \n
|
289
|
+
* This will call \ref imFileReadImageInfo and \ref imFileReadImageData. \n
|
290
|
+
* index specifies the image number between 0 and image_count-1. \n
|
291
|
+
* The returned image will be of the same color_space and data_type of the image in the file,
|
292
|
+
* or will be a Bitmap image. \n
|
293
|
+
* Attributes from the file will be stored at the image.
|
294
|
+
* See also \ref imErrorCodes. \n
|
295
|
+
* For now works only for ECW file format.
|
296
|
+
*
|
297
|
+
* \verbatim ifile:LoadRegion(index, bitmap, xmin, xmax, ymin, ymax, width, height: number) -> image: imImage, error: number [in Lua 5] \endverbatim
|
298
|
+
* Default index is 0.
|
299
|
+
* \ingroup imgfile */
|
300
|
+
imImage* imFileLoadImageRegion(imFile* ifile, int index, int bitmap, int *error,
|
301
|
+
int xmin, int xmax, int ymin, int ymax, int width, int height);
|
302
|
+
|
303
|
+
/** Loads an image from an already open file, but forces the image to be a bitmap.\n
|
304
|
+
* This function assumes that the image in the file has the same parameters as the given image. \n
|
305
|
+
* The imagem must be a Bitmap image, with color_space RGB, MAP, GRAY or BINARY, and data_type IM_BYTE. \n
|
306
|
+
* index specifies the image number between 0 and image_count-1. \n
|
307
|
+
* Returns NULL if failed.
|
308
|
+
* Attributes from the file will be stored at the image.
|
309
|
+
* See also \ref imErrorCodes.
|
310
|
+
*
|
311
|
+
* \verbatim ifile:LoadBitmapFrame(index: number, image: imImage) -> error: number [in Lua 5] \endverbatim
|
312
|
+
* Default index is 0.
|
313
|
+
* \ingroup imgfile */
|
314
|
+
void imFileLoadBitmapFrame(imFile* ifile, int index, imImage* image, int *error);
|
315
|
+
|
316
|
+
/** Saves the image to an already open file. \n
|
317
|
+
* This will call \ref imFileWriteImageInfo and \ref imFileWriteImageData. \n
|
318
|
+
* Attributes from the image will be stored at the file.
|
319
|
+
* Returns error code.
|
320
|
+
*
|
321
|
+
* \verbatim ifile:SaveImage(image: imImage) -> error: number [in Lua 5] \endverbatim
|
322
|
+
* \ingroup imgfile */
|
323
|
+
int imFileSaveImage(imFile* ifile, const imImage* image);
|
324
|
+
|
325
|
+
/** Loads an image from file. Open, loads and closes the file. \n
|
326
|
+
* index specifies the image number between 0 and image_count-1. \n
|
327
|
+
* Returns NULL if failed.
|
328
|
+
* Attributes from the file will be stored at the image.
|
329
|
+
* See also \ref imErrorCodes.
|
330
|
+
*
|
331
|
+
* \verbatim im.FileImageLoad(file_name: string, [index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim
|
332
|
+
* Default index is 0.
|
333
|
+
* \ingroup imgfile */
|
334
|
+
imImage* imFileImageLoad(const char* file_name, int index, int *error);
|
335
|
+
|
336
|
+
/** Loads an image from file, but forces the image to be a bitmap. Open, loads and closes the file. \n
|
337
|
+
* index specifies the image number between 0 and image_count-1. \n
|
338
|
+
* Returns NULL if failed.
|
339
|
+
* Attributes from the file will be stored at the image.
|
340
|
+
* See also \ref imErrorCodes.
|
341
|
+
*
|
342
|
+
* \verbatim im.FileImageLoadBitmap(file_name: string, [index: number]) -> image: imImage, error: number [in Lua 5] \endverbatim
|
343
|
+
* Default index is 0.
|
344
|
+
* \ingroup imgfile */
|
345
|
+
imImage* imFileImageLoadBitmap(const char* file_name, int index, int *error);
|
346
|
+
|
347
|
+
/** Loads an image region from file. Open, loads and closes the file. \n
|
348
|
+
* index specifies the image number between 0 and image_count-1. \n
|
349
|
+
* Returns NULL if failed.
|
350
|
+
* Attributes from the file will be stored at the image.
|
351
|
+
* See also \ref imErrorCodes. \n
|
352
|
+
* For now works only for ECW file format.
|
353
|
+
*
|
354
|
+
* \verbatim im.FileImageLoadRegion(file_name: string, index, bitmap, xmin, xmax, ymin, ymax, width, height: number, ) -> image: imImage, error: number [in Lua 5] \endverbatim
|
355
|
+
* Default index is 0.
|
356
|
+
* \ingroup imgfile */
|
357
|
+
imImage* imFileImageLoadRegion(const char* file_name, int index, int bitmap, int *error,
|
358
|
+
int xmin, int xmax, int ymin, int ymax, int width, int height);
|
359
|
+
|
360
|
+
/** Saves the image to file. Open, saves and closes the file. \n
|
361
|
+
* Returns error code. \n
|
362
|
+
* Attributes from the image will be stored at the file.
|
363
|
+
*
|
364
|
+
* \verbatim im.FileImageSave(file_name: string, format: string, image: imImage) -> error: number [in Lua 5] \endverbatim
|
365
|
+
* \verbatim image:Save(file_name: string, format: string) -> error: number [in Lua 5] \endverbatim
|
366
|
+
* \ingroup imgfile */
|
367
|
+
int imFileImageSave(const char* file_name, const char* format, const imImage* image);
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
/** Utility macro to draw the image in a CD library canvas.
|
372
|
+
* Works only for data_type IM_BYTE, and color spaces: IM_RGB, IM_MAP, IMGRAY and IM_BINARY.
|
373
|
+
* \ingroup imgclass */
|
374
|
+
#define imcdCanvasPutImage(_canvas, _image, _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax) \
|
375
|
+
{ \
|
376
|
+
if (_image->color_space == IM_RGB) \
|
377
|
+
{ \
|
378
|
+
if (_image->has_alpha) \
|
379
|
+
cdCanvasPutImageRectRGBA(_canvas, _image->width, _image->height, \
|
380
|
+
(unsigned char*)_image->data[0], \
|
381
|
+
(unsigned char*)_image->data[1], \
|
382
|
+
(unsigned char*)_image->data[2], \
|
383
|
+
(unsigned char*)_image->data[3], \
|
384
|
+
_x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \
|
385
|
+
else \
|
386
|
+
cdCanvasPutImageRectRGB(_canvas, _image->width, _image->height, \
|
387
|
+
(unsigned char*)_image->data[0], \
|
388
|
+
(unsigned char*)_image->data[1], \
|
389
|
+
(unsigned char*)_image->data[2], \
|
390
|
+
_x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \
|
391
|
+
} \
|
392
|
+
else \
|
393
|
+
cdCanvasPutImageRectMap(_canvas, _image->width, _image->height, \
|
394
|
+
(unsigned char*)_image->data[0], _image->palette, \
|
395
|
+
_x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \
|
396
|
+
}
|
397
|
+
|
398
|
+
|
399
|
+
#if defined(__cplusplus)
|
400
|
+
}
|
401
|
+
#endif
|
402
|
+
|
403
|
+
#endif
|