ruby-iup 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) hide show
  1. data/Rakefile +97 -0
  2. data/doc/README +10 -0
  3. data/doc/build_install.txt +77 -0
  4. data/examples/README +16 -0
  5. data/examples/ctrl/cbox.rb +221 -0
  6. data/examples/ctrl/checkboard.rb +33 -0
  7. data/examples/ctrl/degrade.rb +73 -0
  8. data/examples/ctrl/example1.rb +53 -0
  9. data/examples/ctrl/example2.rb +39 -0
  10. data/examples/ctrl/iupcolorbar.rb +95 -0
  11. data/examples/ctrl/iupcolorbrowser.rb +45 -0
  12. data/examples/ctrl/iupdial.rb +117 -0
  13. data/examples/ctrl/iupgauge.rb +242 -0
  14. data/examples/ctrl/iupgetcolor.rb +8 -0
  15. data/examples/ctrl/iupgetparam.rb +62 -0
  16. data/examples/ctrl/iupglcanvas.rb +172 -0
  17. data/examples/ctrl/iupmask.rb +15 -0
  18. data/examples/ctrl/iupmatrix.rb +39 -0
  19. data/examples/ctrl/iupplot2.rb +603 -0
  20. data/examples/ctrl/iuptabs.rb +22 -0
  21. data/examples/ctrl/iuptree.rb +190 -0
  22. data/examples/ctrl/iupval.rb +71 -0
  23. data/examples/ctrl/numbering.rb +46 -0
  24. data/examples/ctrl/sample.rb +166 -0
  25. data/examples/dlg/iupalarm.rb +14 -0
  26. data/examples/dlg/iupfiledlg.rb +19 -0
  27. data/examples/dlg/iupgetfile.rb +19 -0
  28. data/examples/dlg/iuplistdialog.rb +26 -0
  29. data/examples/dlg/iupmessage.rb +5 -0
  30. data/examples/dlg/iupscanf.rb +17 -0
  31. data/examples/elem/iupbutton.rb +197 -0
  32. data/examples/elem/iupcanvas.rb +27 -0
  33. data/examples/elem/iupcanvas2.rb +113 -0
  34. data/examples/elem/iupcanvas3.rb +62 -0
  35. data/examples/elem/iupdialog.rb +71 -0
  36. data/examples/elem/iupdialog2.rb +25 -0
  37. data/examples/elem/iupfill.rb +51 -0
  38. data/examples/elem/iupframe.rb +25 -0
  39. data/examples/elem/iuphbox.rb +68 -0
  40. data/examples/elem/iupimage.rb +113 -0
  41. data/examples/elem/iupitem.rb +60 -0
  42. data/examples/elem/iuplabel.rb +57 -0
  43. data/examples/elem/iuplist.rb +41 -0
  44. data/examples/elem/iuplist2.rb +125 -0
  45. data/examples/elem/iupmenu.rb +32 -0
  46. data/examples/elem/iupmultiline.rb +24 -0
  47. data/examples/elem/iupmultiline2.rb +156 -0
  48. data/examples/elem/iupradio.rb +32 -0
  49. data/examples/elem/iupseparator.rb +81 -0
  50. data/examples/elem/iupsubmenu.rb +85 -0
  51. data/examples/elem/iuptext.rb +61 -0
  52. data/examples/elem/iuptimer.rb +36 -0
  53. data/examples/elem/iuptoggle.rb +110 -0
  54. data/examples/elem/iupvbox.rb +87 -0
  55. data/examples/elem/iupzbox.rb +60 -0
  56. data/examples/elem/mdisample.rb +376 -0
  57. data/examples/elem/progressbar.rb +294 -0
  58. data/examples/elem/scrollbar.rb +66 -0
  59. data/examples/elem/tray.rb +90 -0
  60. data/examples/func/iupgetattribute.rb +32 -0
  61. data/examples/func/iupidle.rb +48 -0
  62. data/ext/extconf.rb +27 -0
  63. data/ext/iup-linux/include/cd.h +494 -0
  64. data/ext/iup-linux/include/cd_canvas.hpp +358 -0
  65. data/ext/iup-linux/include/cd_old.h +158 -0
  66. data/ext/iup-linux/include/cd_private.h +362 -0
  67. data/ext/iup-linux/include/cdcgm.h +34 -0
  68. data/ext/iup-linux/include/cdclipbd.h +22 -0
  69. data/ext/iup-linux/include/cddbuf.h +23 -0
  70. data/ext/iup-linux/include/cddebug.h +24 -0
  71. data/ext/iup-linux/include/cddgn.h +23 -0
  72. data/ext/iup-linux/include/cddxf.h +22 -0
  73. data/ext/iup-linux/include/cdemf.h +22 -0
  74. data/ext/iup-linux/include/cdgdiplus.h +29 -0
  75. data/ext/iup-linux/include/cdimage.h +23 -0
  76. data/ext/iup-linux/include/cdirgb.h +30 -0
  77. data/ext/iup-linux/include/cdiup.h +22 -0
  78. data/ext/iup-linux/include/cdlua.h +39 -0
  79. data/ext/iup-linux/include/cdlua3_private.h +120 -0
  80. data/ext/iup-linux/include/cdlua5_private.h +141 -0
  81. data/ext/iup-linux/include/cdluaim.h +24 -0
  82. data/ext/iup-linux/include/cdluaiup.h +27 -0
  83. data/ext/iup-linux/include/cdluapdf.h +27 -0
  84. data/ext/iup-linux/include/cdmf.h +24 -0
  85. data/ext/iup-linux/include/cdmf_private.h +32 -0
  86. data/ext/iup-linux/include/cdnative.h +26 -0
  87. data/ext/iup-linux/include/cdpdf.h +38 -0
  88. data/ext/iup-linux/include/cdpicture.h +22 -0
  89. data/ext/iup-linux/include/cdprint.h +23 -0
  90. data/ext/iup-linux/include/cdps.h +37 -0
  91. data/ext/iup-linux/include/cdwmf.h +22 -0
  92. data/ext/iup-linux/include/im.h +282 -0
  93. data/ext/iup-linux/include/im_attrib.h +116 -0
  94. data/ext/iup-linux/include/im_attrib_flat.h +39 -0
  95. data/ext/iup-linux/include/im_binfile.h +214 -0
  96. data/ext/iup-linux/include/im_capture.h +365 -0
  97. data/ext/iup-linux/include/im_color.h +465 -0
  98. data/ext/iup-linux/include/im_colorhsi.h +61 -0
  99. data/ext/iup-linux/include/im_complex.h +160 -0
  100. data/ext/iup-linux/include/im_convert.h +127 -0
  101. data/ext/iup-linux/include/im_counter.h +69 -0
  102. data/ext/iup-linux/include/im_dib.h +195 -0
  103. data/ext/iup-linux/include/im_file.h +111 -0
  104. data/ext/iup-linux/include/im_format.h +79 -0
  105. data/ext/iup-linux/include/im_format_all.h +576 -0
  106. data/ext/iup-linux/include/im_format_avi.h +87 -0
  107. data/ext/iup-linux/include/im_format_ecw.h +93 -0
  108. data/ext/iup-linux/include/im_format_jp2.h +78 -0
  109. data/ext/iup-linux/include/im_format_raw.h +64 -0
  110. data/ext/iup-linux/include/im_format_wmv.h +100 -0
  111. data/ext/iup-linux/include/im_image.h +403 -0
  112. data/ext/iup-linux/include/im_kernel.h +315 -0
  113. data/ext/iup-linux/include/im_lib.h +191 -0
  114. data/ext/iup-linux/include/im_math.h +368 -0
  115. data/ext/iup-linux/include/im_math_op.h +219 -0
  116. data/ext/iup-linux/include/im_palette.h +172 -0
  117. data/ext/iup-linux/include/im_plus.h +73 -0
  118. data/ext/iup-linux/include/im_process.h +35 -0
  119. data/ext/iup-linux/include/im_process_ana.h +221 -0
  120. data/ext/iup-linux/include/im_process_glo.h +170 -0
  121. data/ext/iup-linux/include/im_process_loc.h +577 -0
  122. data/ext/iup-linux/include/im_process_pon.h +712 -0
  123. data/ext/iup-linux/include/im_raw.h +34 -0
  124. data/ext/iup-linux/include/im_util.h +277 -0
  125. data/ext/iup-linux/include/imlua.h +83 -0
  126. data/ext/iup-linux/include/iup.h +255 -0
  127. data/ext/iup-linux/include/iup_pplot.h +40 -0
  128. data/ext/iup-linux/include/iupcb.h +25 -0
  129. data/ext/iup-linux/include/iupcbox.h +23 -0
  130. data/ext/iup-linux/include/iupcbs.h +42 -0
  131. data/ext/iup-linux/include/iupcells.h +130 -0
  132. data/ext/iup-linux/include/iupcolorbar.h +126 -0
  133. data/ext/iup-linux/include/iupcompat.h +62 -0
  134. data/ext/iup-linux/include/iupcontrols.h +40 -0
  135. data/ext/iup-linux/include/iupcpi.h +76 -0
  136. data/ext/iup-linux/include/iupdef.h +520 -0
  137. data/ext/iup-linux/include/iupdial.h +64 -0
  138. data/ext/iup-linux/include/iupgauge.h +57 -0
  139. data/ext/iup-linux/include/iupgc.h +20 -0
  140. data/ext/iup-linux/include/iupgetparam.h +27 -0
  141. data/ext/iup-linux/include/iupgl.h +101 -0
  142. data/ext/iup-linux/include/iupim.h +21 -0
  143. data/ext/iup-linux/include/iupkey.h +290 -0
  144. data/ext/iup-linux/include/iuplua.h +41 -0
  145. data/ext/iup-linux/include/iuplua_pplot.h +26 -0
  146. data/ext/iup-linux/include/iupluacontrols.h +27 -0
  147. data/ext/iup-linux/include/iupluagl.h +26 -0
  148. data/ext/iup-linux/include/iupluaim.h +26 -0
  149. data/ext/iup-linux/include/iupluaole.h +26 -0
  150. data/ext/iup-linux/include/iupmask.h +52 -0
  151. data/ext/iup-linux/include/iupmatrix.h +69 -0
  152. data/ext/iup-linux/include/iupole.h +24 -0
  153. data/ext/iup-linux/include/iupsbox.h +20 -0
  154. data/ext/iup-linux/include/iupspeech.h +23 -0
  155. data/ext/iup-linux/include/iupspin.h +21 -0
  156. data/ext/iup-linux/include/iuptabs.h +79 -0
  157. data/ext/iup-linux/include/iuptree.h +93 -0
  158. data/ext/iup-linux/include/iupval.h +46 -0
  159. data/ext/iup-linux/include/lauxlib.h +174 -0
  160. data/ext/iup-linux/include/lua.h +388 -0
  161. data/ext/iup-linux/include/lua.hpp +9 -0
  162. data/ext/iup-linux/include/luaconf.h +763 -0
  163. data/ext/iup-linux/include/lualib.h +53 -0
  164. data/ext/iup-linux/include/old_im.h +59 -0
  165. data/ext/iup-linux/include/wd.h +78 -0
  166. data/ext/iup-linux/include/wd_old.h +85 -0
  167. data/ext/iup-linux/libcd.so +0 -0
  168. data/ext/iup-linux/libcdcontextplus.so +0 -0
  169. data/ext/iup-linux/libcdluacontextplus51.so +0 -0
  170. data/ext/iup-linux/libcdpdf.so +0 -0
  171. data/ext/iup-linux/libfreetype.so +0 -0
  172. data/ext/iup-linux/libim.so +0 -0
  173. data/ext/iup-linux/libim_fftw.so +0 -0
  174. data/ext/iup-linux/libim_jp2.so +0 -0
  175. data/ext/iup-linux/libim_process.so +0 -0
  176. data/ext/iup-linux/libiup.so +0 -0
  177. data/ext/iup-linux/libiup_pplot.so +0 -0
  178. data/ext/iup-linux/libiupcd.so +0 -0
  179. data/ext/iup-linux/libiupcontrols.so +0 -0
  180. data/ext/iup-linux/libiupgl.so +0 -0
  181. data/ext/iup-linux/libiupim.so +0 -0
  182. data/ext/iup-linux/libiupimglib.so +0 -0
  183. data/ext/iup-linux/libpdflib.so +0 -0
  184. data/ext/iup-win32/cd.dll +0 -0
  185. data/ext/iup-win32/cd.lib +0 -0
  186. data/ext/iup-win32/cdcontextplus.dll +0 -0
  187. data/ext/iup-win32/cdcontextplus.lib +0 -0
  188. data/ext/iup-win32/cdlua51.lib +0 -0
  189. data/ext/iup-win32/cdluacontextplus51.lib +0 -0
  190. data/ext/iup-win32/cdluaim51.lib +0 -0
  191. data/ext/iup-win32/cdluapdf51.lib +0 -0
  192. data/ext/iup-win32/cdpdf.dll +0 -0
  193. data/ext/iup-win32/cdpdf.lib +0 -0
  194. data/ext/iup-win32/freetype6.dll +0 -0
  195. data/ext/iup-win32/freetype6.lib +0 -0
  196. data/ext/iup-win32/im.dll +0 -0
  197. data/ext/iup-win32/im_avi.dll +0 -0
  198. data/ext/iup-win32/im_capture.dll +0 -0
  199. data/ext/iup-win32/im_ecw.dll +0 -0
  200. data/ext/iup-win32/im_fftw.dll +0 -0
  201. data/ext/iup-win32/im_jp2.dll +0 -0
  202. data/ext/iup-win32/im_process.dll +0 -0
  203. data/ext/iup-win32/im_wmv.dll +0 -0
  204. data/ext/iup-win32/include/cd.h +494 -0
  205. data/ext/iup-win32/include/cd_canvas.hpp +358 -0
  206. data/ext/iup-win32/include/cd_old.h +158 -0
  207. data/ext/iup-win32/include/cd_private.h +362 -0
  208. data/ext/iup-win32/include/cdcgm.h +34 -0
  209. data/ext/iup-win32/include/cdclipbd.h +22 -0
  210. data/ext/iup-win32/include/cddbuf.h +23 -0
  211. data/ext/iup-win32/include/cddebug.h +24 -0
  212. data/ext/iup-win32/include/cddgn.h +23 -0
  213. data/ext/iup-win32/include/cddxf.h +22 -0
  214. data/ext/iup-win32/include/cdemf.h +22 -0
  215. data/ext/iup-win32/include/cdgdiplus.h +29 -0
  216. data/ext/iup-win32/include/cdimage.h +23 -0
  217. data/ext/iup-win32/include/cdirgb.h +30 -0
  218. data/ext/iup-win32/include/cdiup.h +22 -0
  219. data/ext/iup-win32/include/cdlua.h +39 -0
  220. data/ext/iup-win32/include/cdlua3_private.h +120 -0
  221. data/ext/iup-win32/include/cdlua5_private.h +141 -0
  222. data/ext/iup-win32/include/cdluaim.h +24 -0
  223. data/ext/iup-win32/include/cdluaiup.h +27 -0
  224. data/ext/iup-win32/include/cdluapdf.h +27 -0
  225. data/ext/iup-win32/include/cdmf.h +24 -0
  226. data/ext/iup-win32/include/cdmf_private.h +32 -0
  227. data/ext/iup-win32/include/cdnative.h +26 -0
  228. data/ext/iup-win32/include/cdpdf.h +38 -0
  229. data/ext/iup-win32/include/cdpicture.h +22 -0
  230. data/ext/iup-win32/include/cdprint.h +23 -0
  231. data/ext/iup-win32/include/cdps.h +37 -0
  232. data/ext/iup-win32/include/cdwmf.h +22 -0
  233. data/ext/iup-win32/include/iup.h +255 -0
  234. data/ext/iup-win32/include/iup_pplot.h +40 -0
  235. data/ext/iup-win32/include/iupcb.h +25 -0
  236. data/ext/iup-win32/include/iupcbox.h +23 -0
  237. data/ext/iup-win32/include/iupcbs.h +42 -0
  238. data/ext/iup-win32/include/iupcells.h +130 -0
  239. data/ext/iup-win32/include/iupcolorbar.h +126 -0
  240. data/ext/iup-win32/include/iupcompat.h +62 -0
  241. data/ext/iup-win32/include/iupcontrols.h +40 -0
  242. data/ext/iup-win32/include/iupcpi.h +76 -0
  243. data/ext/iup-win32/include/iupdef.h +520 -0
  244. data/ext/iup-win32/include/iupdial.h +64 -0
  245. data/ext/iup-win32/include/iupgauge.h +57 -0
  246. data/ext/iup-win32/include/iupgc.h +20 -0
  247. data/ext/iup-win32/include/iupgetparam.h +27 -0
  248. data/ext/iup-win32/include/iupgl.h +101 -0
  249. data/ext/iup-win32/include/iupim.h +21 -0
  250. data/ext/iup-win32/include/iupkey.h +290 -0
  251. data/ext/iup-win32/include/iuplua.h +41 -0
  252. data/ext/iup-win32/include/iuplua_pplot.h +26 -0
  253. data/ext/iup-win32/include/iupluacontrols.h +27 -0
  254. data/ext/iup-win32/include/iupluagl.h +26 -0
  255. data/ext/iup-win32/include/iupluaim.h +26 -0
  256. data/ext/iup-win32/include/iupluaole.h +26 -0
  257. data/ext/iup-win32/include/iupmask.h +52 -0
  258. data/ext/iup-win32/include/iupmatrix.h +69 -0
  259. data/ext/iup-win32/include/iupole.h +24 -0
  260. data/ext/iup-win32/include/iupsbox.h +20 -0
  261. data/ext/iup-win32/include/iupspeech.h +23 -0
  262. data/ext/iup-win32/include/iupspin.h +21 -0
  263. data/ext/iup-win32/include/iuptabs.h +79 -0
  264. data/ext/iup-win32/include/iuptree.h +93 -0
  265. data/ext/iup-win32/include/iupval.h +46 -0
  266. data/ext/iup-win32/include/wd.h +78 -0
  267. data/ext/iup-win32/include/wd_old.h +85 -0
  268. data/ext/iup-win32/iup.dll +0 -0
  269. data/ext/iup-win32/iup.lib +0 -0
  270. data/ext/iup-win32/iup_pplot.dll +0 -0
  271. data/ext/iup-win32/iup_pplot.lib +0 -0
  272. data/ext/iup-win32/iupcd.dll +0 -0
  273. data/ext/iup-win32/iupcd.lib +0 -0
  274. data/ext/iup-win32/iupcontrols.dll +0 -0
  275. data/ext/iup-win32/iupcontrols.lib +0 -0
  276. data/ext/iup-win32/iupgl.dll +0 -0
  277. data/ext/iup-win32/iupgl.lib +0 -0
  278. data/ext/iup-win32/iupim.dll +0 -0
  279. data/ext/iup-win32/iupim.lib +0 -0
  280. data/ext/iup-win32/iupimglib.dll +0 -0
  281. data/ext/iup-win32/iupimglib.lib +0 -0
  282. data/ext/iup-win32/iuplua51.lib +0 -0
  283. data/ext/iup-win32/iuplua_pplot51.lib +0 -0
  284. data/ext/iup-win32/iupluacd51.lib +0 -0
  285. data/ext/iup-win32/iupluacontrols51.lib +0 -0
  286. data/ext/iup-win32/iupluagl51.lib +0 -0
  287. data/ext/iup-win32/iupluaim51.lib +0 -0
  288. data/ext/iup-win32/iupluaimglib51.lib +0 -0
  289. data/ext/iup-win32/iupluaole51.lib +0 -0
  290. data/ext/iup-win32/iupole.dll +0 -0
  291. data/ext/iup-win32/iupole.lib +0 -0
  292. data/ext/iup-win32/iupstub.lib +0 -0
  293. data/ext/iup-win32/pdflib.dll +0 -0
  294. data/ext/iup-win32/pdflib.lib +0 -0
  295. data/ext/iup.c +1261 -0
  296. data/ext/mkrf_conf.rb +72 -0
  297. data/ext/rb_cd.h +1525 -0
  298. data/ext/rb_iup.h +2446 -0
  299. data/ext/rb_iup_pplot.h +129 -0
  300. data/ext/rb_iupcb.h +13 -0
  301. data/ext/rb_iupcbox.h +40 -0
  302. data/ext/rb_iupcells.h +15 -0
  303. data/ext/rb_iupcolorbar.h +17 -0
  304. data/ext/rb_iupcompat.h +237 -0
  305. data/ext/rb_iupcontrols.h +28 -0
  306. data/ext/rb_iupdef.h +3 -0
  307. data/ext/rb_iupdial.h +24 -0
  308. data/ext/rb_iupgauge.h +15 -0
  309. data/ext/rb_iupgc.h +18 -0
  310. data/ext/rb_iupgetparam.h +72 -0
  311. data/ext/rb_iupgl.h +58 -0
  312. data/ext/rb_iupim.h +25 -0
  313. data/ext/rb_iupmask.h +189 -0
  314. data/ext/rb_iupmatrix.h +80 -0
  315. data/ext/rb_iupole.h +24 -0
  316. data/ext/rb_iupsbox.h +23 -0
  317. data/ext/rb_iupspeech.h +25 -0
  318. data/ext/rb_iupspin.h +29 -0
  319. data/ext/rb_iuptabs.h +29 -0
  320. data/ext/rb_iuptree.h +94 -0
  321. data/ext/rb_iupval.h +24 -0
  322. data/lib/README +1 -0
  323. metadata +391 -0
@@ -0,0 +1,111 @@
1
+ /** \file
2
+ * \brief File Access
3
+ *
4
+ * See Copyright Notice in im_lib.h
5
+ */
6
+
7
+ #ifndef __IM_FILE_H
8
+ #define __IM_FILE_H
9
+
10
+ #include "im.h"
11
+
12
+ #if defined(__cplusplus)
13
+ extern "C" {
14
+ #endif
15
+
16
+
17
+ /** \defgroup filesdk File Format SDK
18
+ * \par
19
+ * All the file formats are based on theses structures. Use them to create new file formats. \n
20
+ * The LineBuffer functions will help transfer image from format buffer to application buffer and vice-versa.
21
+ * \par
22
+ * See \ref im_file.h
23
+ * \ingroup file */
24
+
25
+
26
+ /** \brief Image File Format Base (SDK Use Only)
27
+ *
28
+ * \par
29
+ * Base container to hold format independent state variables.
30
+ * \ingroup filesdk */
31
+ struct _imFile
32
+ {
33
+ int is_new;
34
+ void* attrib_table; /**< in fact is a imAttribTable, but we hide this here */
35
+
36
+ void* line_buffer; /**< used for line convertion, contains all components if packed, or only one if not */
37
+ int line_buffer_size;
38
+ int line_buffer_extra; /**< extra bytes to be allocated */
39
+ int line_buffer_alloc; /**< total allocated so far */
40
+ int counter;
41
+
42
+ int convert_bpp; /**< number of bpp to unpack/pack to/from 1 byte.
43
+ When reading converts n packed bits to 1 byte (unpack). If n>1 will also expand to 0-255.
44
+ When writing converts 1 byte to 1 bit (pack).
45
+ If negative will only expand to 0-255 (no unpack or pack). */
46
+ int switch_type; /**< flag to switch the original data type: char-byte, short-ushort, uint-int, double-float */
47
+
48
+ long palette[256];
49
+ int palette_count;
50
+
51
+ int user_color_mode,
52
+ user_data_type,
53
+ file_color_mode, /* these two must be filled by te driver always. */
54
+ file_data_type;
55
+
56
+ /* these must be filled by the driver when reading,
57
+ and given by the user when writing. */
58
+
59
+ char compression[10];
60
+ int image_count,
61
+ image_index,
62
+ width,
63
+ height;
64
+ };
65
+
66
+
67
+ /* Internal Use only */
68
+
69
+ /* Initializes the imFile structure.
70
+ * Used by the special format RAW. */
71
+ void imFileClear(imFile* ifile);
72
+
73
+ /* Initializes the line buffer.
74
+ * Used by "im_file.cpp" only. */
75
+ void imFileLineBufferInit(imFile* ifile);
76
+
77
+ /* Check if the conversion is valid.
78
+ * Used by "im_file.cpp" only. */
79
+ int imFileCheckConversion(imFile* ifile);
80
+
81
+
82
+
83
+ /* File Format SDK */
84
+
85
+ /** Number of lines to be accessed.
86
+ * \ingroup filesdk */
87
+ int imFileLineBufferCount(imFile* ifile);
88
+
89
+ /** Increments the row and plane counters.
90
+ * \ingroup filesdk */
91
+ void imFileLineBufferInc(imFile* ifile, int *row, int *plane);
92
+
93
+ /** Converts from FILE color mode to USER color mode.
94
+ * \ingroup filesdk */
95
+ void imFileLineBufferRead(imFile* ifile, void* data, int line, int plane);
96
+
97
+ /** Converts from USER color mode to FILE color mode.
98
+ * \ingroup filesdk */
99
+ void imFileLineBufferWrite(imFile* ifile, const void* data, int line, int plane);
100
+
101
+ /** Utility to calculate the line size in byte with a specified alignment. \n
102
+ * "align" can be 1, 2 or 4.
103
+ * \ingroup filesdk */
104
+ int imFileLineSizeAligned(int width, int bpp, int align);
105
+
106
+
107
+ #if defined(__cplusplus)
108
+ }
109
+ #endif
110
+
111
+ #endif
@@ -0,0 +1,79 @@
1
+ /** \file
2
+ * \brief File Format Access
3
+ *
4
+ * See Copyright Notice in im_lib.h
5
+ */
6
+
7
+ #include "im_file.h"
8
+ #include "im_attrib.h"
9
+
10
+ #ifndef __IM_FORMAT_H
11
+ #define __IM_FORMAT_H
12
+
13
+
14
+ /** \brief Image File Format Driver (SDK Use Only)
15
+ *
16
+ * \par
17
+ * Virtual Base class for file formats. All file formats inherit from this class.
18
+ * \ingroup filesdk */
19
+ class imFormat: public _imFile
20
+ {
21
+ public:
22
+ const char* format;
23
+ const char* desc;
24
+ const char* ext;
25
+ const char** comp;
26
+ int comp_count,
27
+ can_sequence;
28
+
29
+ imFormat(const char* _format, const char* _desc, const char* _ext,
30
+ const char** _comp, int _comp_count, int _can_sequence)
31
+ :format(_format), desc(_desc), ext(_ext), comp(_comp),
32
+ comp_count(_comp_count), can_sequence(_can_sequence)
33
+ {}
34
+ virtual ~imFormat() {}
35
+
36
+ imAttribTable* AttribTable() {return (imAttribTable*)this->attrib_table;}
37
+
38
+ /* Pure Virtual Methods. Every driver must implement all the following methods. */
39
+
40
+ virtual int Open(const char* file_name) = 0; // Must initialize compression and image_count
41
+ virtual int New(const char* file_name) = 0;
42
+ virtual void Close() = 0;
43
+ virtual void* Handle(int index) = 0;
44
+ virtual int ReadImageInfo(int index) = 0; // Should update compression
45
+ virtual int ReadImageData(void* data) = 0;
46
+ virtual int WriteImageInfo() = 0; // Should update compression
47
+ virtual int WriteImageData(void* data) = 0; // Must update image_count
48
+ virtual int CanWrite(const char* compression, int color_mode, int data_type) const = 0;
49
+ };
50
+
51
+ extern "C"
52
+ {
53
+
54
+ /* Internal Use only */
55
+
56
+ /* Opens a file with the respective format driver
57
+ * Uses the file extension to speed up the search for the format driver.
58
+ * Used by "im_file.cpp" only. */
59
+ imFormat* imFormatOpen(const char* file_name, int *error);
60
+
61
+ /* Opens a file with the given format
62
+ * Used by "im_file.cpp" only. */
63
+ imFormat* imFormatOpenAs(const char* file_name, const char* format, int *error);
64
+
65
+ /* Creates a file using the given format driver.
66
+ * Used by "im_file.cpp" only. */
67
+ imFormat* imFormatNew(const char* file_name, const char* format, int *error);
68
+
69
+
70
+ /* File Format SDK */
71
+
72
+ /** Register a format driver.
73
+ * \ingroup filesdk */
74
+ void imFormatRegister(imFormat* iformat);
75
+
76
+
77
+ }
78
+
79
+ #endif
@@ -0,0 +1,576 @@
1
+ /** \file
2
+ * \brief All the Internal File Formats.
3
+ * They are all automatically registered by the library.
4
+ * The signatures are in C, but the functions are C++.
5
+ * Header for internal use only.
6
+ *
7
+ * See Copyright Notice in im_lib.h
8
+ */
9
+
10
+ #ifndef __IM_FORMAT_ALL_H
11
+ #define __IM_FORMAT_ALL_H
12
+
13
+ #if defined(__cplusplus)
14
+ extern "C" {
15
+ #endif
16
+
17
+ /** \defgroup tiff TIFF - Tagged Image File Format
18
+ * \section Description
19
+ *
20
+ * \par
21
+ * Copyright (c) 1986-1988, 1992 by Adobe Systems Incorporated. \n
22
+ * Originally created by a group of companies,
23
+ * the Aldus Corporation keeped the copyright until Aldus was aquired by Adobe. \n
24
+ * TIFF Revision 6.0 Final � June 3, 1992 \n
25
+ * http://www.adobe.com/Support/TechNotes.html
26
+ * \par
27
+ * Access to the TIFF file format uses libTIFF version 3.8.2 \n
28
+ * http://www.remotesensing.org/libtiff/ \n
29
+ * Copyright (c) 1988-1997 Sam Leffler \n
30
+ * Copyright (c) 1991-1997 Silicon Graphics, Inc. \n
31
+ *
32
+ * \section Features
33
+ *
34
+ \verbatim
35
+ Data Types: <all>
36
+ Color Spaces: Gray, RGB, CMYK, YCbCr, Lab, XYZ, Map and Binary.
37
+ Compressions:
38
+ NONE - no compression [default for IEEE Floating Point Data]
39
+ CCITTRLE - CCITT modified Huffman RLE (binary only) [default for Binary]
40
+ CCITTFAX3 - CCITT Group 3 fax (binary only)
41
+ CCITTFAX4 - CCITT Group 4 fax (binary only)
42
+ LZW - Lempel-Ziv & Welch [default]
43
+ JPEG - ISO JPEG [default for YCBCR]
44
+ NEXT - NeXT 2-bit RLE (2 bpp only)
45
+ CCITTRLEW - CCITT modified Huffman RLE with word alignment (binary only)
46
+ RLE - Packbits (Macintosh RLE) [default for MAP]
47
+ THUNDERSCAN - ThunderScan 4-bit RLE (only for 2 or 4 bpp)
48
+ PIXARLOG - Pixar companded 11-bit ZIP (only byte, ushort and float)
49
+ DEFLATE - LZ77 variation (ZIP)
50
+ ADOBE_DEFLATE - Adobe LZ77 variation
51
+ SGILOG - SGI Log Luminance RLE for L and Luv (only byte, ushort and float) [default for XYZ]
52
+ SGILOG24 - SGI Log 24-bit packed for Luv (only byte, ushort and float)
53
+ Can have more than one image.
54
+ Can have an alpha channel.
55
+ Components can be packed or not.
56
+ Lines arranged from top down to bottom or bottom up to top.
57
+ Handle(1) returns a TIFF* libTIFF structure.
58
+
59
+ Attributes:
60
+ Photometric IM_USHORT (1) (when writing this will complement the color_mode information, for Mask, MinIsWhite, ITULab and ICCLab)
61
+ ExtraSampleInfo IM_USHORT (1) (description of alpha channel: 0- uknown, 1- pre-multiplied, 2-normal)
62
+ JPEGQuality IM_INT (1) [0-100, default 75] (write only)
63
+ ZIPQuality IM_INT (1) [1-9, default 6] (write only)
64
+ ResolutionUnit (string) ["DPC", "DPI"]
65
+ XResolution, YResolution IM_FLOAT (1)
66
+ Description, Author, Copyright, DateTime, DocumentName,
67
+ PageName, TargetPrinter, Make, Model, Software, HostComputer (string)
68
+ InkNames (strings separated by '0's)
69
+ InkSet IM_USHORT (1)
70
+ NumberOfInks IM_USHORT (1)
71
+ DotRange IM_USHORT (2)
72
+ TransferFunction0, TransferFunction1, TransferFunction3 IM_USHORT [gray=0, rgb=012]
73
+ ReferenceBlackWhite IMFLOAT (6)
74
+ WhitePoint IMFLOAT (2)
75
+ PrimaryChromaticities IMFLOAT (6)
76
+ YCbCrCoefficients IM_FLOAT (3)
77
+ YCbCrSubSampling IM_USHORT (2)
78
+ YCbCrPositioning IM_USHORT (1)
79
+ PageNumber IM_USHORT (2)
80
+ StoNits IM_FLOAT (1)
81
+ XPosition, YPosition IM_FLOAT (1)
82
+ SMinSampleValue, SMaxSampleValue IM_FLOAT (1)
83
+ HalftoneHints IM_USHORT (2)
84
+ SubfileType IM_INT (1)
85
+ ICCProfile IM_BYTE (N)
86
+ MultiBandCount IM_USHORT (1) [Number of bands in a multiband gray image.]
87
+ MultiBandSelect IM_USHORT (1) [Band number to read one band of a multiband gray image. Must be set before reading image info.]
88
+ and other TIFF tags as they are described in the TIFF documentation.
89
+ GeoTIFF tags:
90
+ GeoTiePoints, GeoTransMatrix, IntergraphMatrix, GeoPixelScale, GeoDoubleParams IM_FLOAT (N)
91
+ GeoASCIIParams (string)
92
+ Read-only support for EXIF tags as they are described in the EXIF 2.2 documentation. See http://www.exif.org/
93
+ DNG tags as they are described in the DNG documentation. See http://www.adobe.com/br/products/dng/
94
+ Tags BlackLevel, DefaultCropOrigin and DefaultCropSize are incorrectly interpreted by libTIFF so they are ignored.
95
+ Raw image is loaded in place of the thumbnail image in the main IFD.
96
+ SubIFDCount IM_USHORT (1) [Number of subifds of the current image.]
97
+ SubIFDSelect IM_USHORT (1) [Subifd number to be readed. Must be set before reading image info.]
98
+ (other attributes can be obtained by using libTIFF directly using the Handle(1) function)
99
+
100
+ Comments:
101
+ LogLuv is in fact Y'+CIE(u,v), so we choose to always convert it to XYZ.
102
+ SubIFD is handled only for DNG.
103
+ Since LZW patent expired, LZW compression is enabled. LZW Copyright Unisys.
104
+ libGeoTIFF can be used without XTIFF initialization. Use Handle(1) to obtain a TIFF*.
105
+
106
+ Changes:
107
+ "tiff_jpeg.c" - commented "downsampled_output = TRUE" in 2 places.
108
+ New file "tif_config.h" to match our needs.
109
+ New file "tiff_binfile.c" that implement I/O rotines using imBinFile.
110
+ \endverbatim
111
+ * \ingroup format */
112
+ void imFormatRegisterTIFF(void);
113
+
114
+ /** \defgroup jpeg JPEG - JPEG File Interchange Format
115
+ * \section Description
116
+ *
117
+ * \par
118
+ * ISO/IEC 10918 (1994, 1995, 1997, 1999)\n
119
+ * http://www.jpeg.org/
120
+ * \par
121
+ * Access to the JPEG file format uses libJPEG version 6b. \n
122
+ * http://www.ijg.org \n
123
+ * Copyright (C) 1991-1998, Thomas G. Lane \n
124
+ * from the Independent JPEG Group.
125
+ * \par
126
+ * Access to the EXIF attributes uses libEXIF version 0.6.12. \n
127
+ * http://sourceforge.net/projects/libexif \n
128
+ * Copyright (C) 2001-2003, Lutz M�ller
129
+ *
130
+ * \section Features
131
+ *
132
+ \verbatim
133
+ Data Types: Byte
134
+ Color Spaces: Gray, RGB, CMYK and YCbCr (Binary Saved as Gray)
135
+ Compressions:
136
+ JPEG - ISO JPEG [default]
137
+ Only one image.
138
+ No alpha channel.
139
+ Internally the components are always packed.
140
+ Internally the lines are arranged from top down to bottom.
141
+ Handle(1) returns jpeg_decompress_struct* when reading, and
142
+ jpeg_compress_struct* when writing (libJPEG structures).
143
+
144
+ Attributes:
145
+ AutoYCbCr IM_INT (1) (controls YCbCr auto conversion) default 1
146
+ JPEGQuality IM_INT (1) [0-100, default 75] (write only)
147
+ ResolutionUnit (string) ["DPC", "DPI"]
148
+ XResolution, YResolution IM_FLOAT (1)
149
+ Interlaced (same as Progressive) IM_INT (1 | 0) default 0
150
+ Description (string)
151
+ (lots of Exif tags)
152
+
153
+ Changes to libJPEG:
154
+ jdatadst.c - fflush and ferror replaced by macros JFFLUSH and JFERROR.
155
+ jinclude.h - standard JFFLUSH and JFERROR definitions, and new macro HAVE_JFIO.
156
+ jmorecfg.h - changed definition of INT32 to JINT32 for better compatibility.
157
+ jdhuf.c - added support for OJPEG_SUPPORT in libTIFF.
158
+ new file created: jconfig.h
159
+
160
+ Changes to libEXIF:
161
+ new file config.h
162
+ changed "exif-tag.c" to add new function
163
+ changed "exif-entry.c" to improve exif_entry_initialize
164
+ fixed small bug in "mnote-pentax-tag.h".
165
+
166
+ Comments:
167
+ Other APPx markers are ignored.
168
+ No thumbnail support.
169
+ RGB images are automatically converted to YCbCr when saved.
170
+ Also YcbCr are converted to RGB when loaded. Use AutoYCbCr=0 to disable this behavior.
171
+ \endverbatim
172
+ * \ingroup format */
173
+ void imFormatRegisterJPEG(void);
174
+
175
+ /** \defgroup png PNG - Portable Network Graphic Format
176
+ * \section Description
177
+ *
178
+ * \par
179
+ * Access to the PNG file format uses libPNG version 1.2.22. \n
180
+ * http://www.libpng.org \n
181
+ * Copyright (C) 1998-2007 Glenn Randers-Pehrson
182
+ *
183
+ * \section Features
184
+ *
185
+ \verbatim
186
+ Data Types: Byte and UShort
187
+ Color Spaces: Gray, RGB, MAP and Binary
188
+ Compressions:
189
+ DEFLATE - LZ77 variation (ZIP) [default]
190
+ Only one image.
191
+ Can have an alpha channel.
192
+ Internally the components are always packed.
193
+ Internally the lines are arranged from top down to bottom.
194
+ Handle(1) returns png_structp libPNG structure.
195
+
196
+ Attributes:
197
+ ZIPQuality IM_INT (1) [1-9, default 6] (write only)
198
+ ResolutionUnit (string) ["DPC", "DPI"]
199
+ XResolution, YResolution IM_FLOAT (1)
200
+ Interlaced (same as Progressive) IM_INT (1 | 0) default 0
201
+ Gamma IM_FLOAT (1)
202
+ WhitePoint IMFLOAT (2)
203
+ PrimaryChromaticities IMFLOAT (6)
204
+ XPosition, YPosition IM_FLOAT (1)
205
+ sRGBIntent IM_INT (1) [0: Perceptual, 1: Relative colorimetric, 2: Saturation, 3: Absolute colorimetric]
206
+ TransparencyIndex IM_BYTE (1 or N)
207
+ TransparentColor IM_BYTE (3)
208
+ CalibrationName, CalibrationUnits (string)
209
+ CalibrationLimits IM_INT (2)
210
+ CalibrationEquation IM_BYTE (1) [0-Linear,1-Exponential,2-Arbitrary,3-HyperbolicSine)]
211
+ CalibrationParam (string) [params separated by '\\n']
212
+ Title, Author, Description, Copyright, DateTime (string)
213
+ Software, Disclaimer, Warning, Source, Comment, ... (string)
214
+ DateTimeModified (string) [when writing uses the current system time]
215
+ ICCProfile IM_BYTE (N)
216
+ ScaleUnit (string) ["meters", "radians"]
217
+ XScale, YScale IM_FLOAT (1)
218
+
219
+ Comments:
220
+ Attributes after the image are ignored.
221
+ Define PNG_NO_CONSOLE_IO to avoid printfs.
222
+ We define PNG_TIME_RFC1123_SUPPORTED.
223
+ Add the following files to the makefile to optimize the library:
224
+ pngvcrd.c - PNG_USE_PNGVCRD
225
+ For Intel x86 CPU and Microsoft Visual C++ compiler
226
+ pnggccrd.c - PNG_USE_PNGGCCRD
227
+ For Intel x86 CPU (Pentium-MMX or later) and GNU C compiler.
228
+ Changed pngconf.h to use int instead of long in png_uint_32 and png_int_32.
229
+ \endverbatim
230
+ * \ingroup format */
231
+ void imFormatRegisterPNG(void);
232
+
233
+ /** \defgroup gif GIF - Graphics Interchange Format
234
+ * \section Description
235
+ *
236
+ * \par
237
+ * Copyright (c) 1987,1988,1989,1990 CompuServe Incorporated. \n
238
+ * GIF is a Service Mark property of CompuServe Incorporated. \n
239
+ * Graphics Interchange Format Programming Reference, 1990. \n
240
+ * LZW Copyright Unisys.
241
+ * \par
242
+ * Patial Internal Implementation. \n
243
+ * Decoding and encoding code were extracted from GIFLib 1.0. \n
244
+ * Copyright (c) 1989 Gershon Elber.
245
+ *
246
+ * \section Features
247
+ *
248
+ \verbatim
249
+ Data Types: Byte
250
+ Color Spaces: MAP only, (Gray and Binary saved as MAP)
251
+ Compressions:
252
+ LZW - Lempel-Ziv & Welch [default]
253
+ Can have more than one image.
254
+ No alpha channel.
255
+ Internally the lines are arranged from top down to bottom.
256
+
257
+ Attributes:
258
+ ScreenHeight, ScreenWidth IM_USHORT (1) screen size [default to the first image size]
259
+ Interlaced IM_INT (1 | 0) default 0
260
+ Description (string)
261
+ TransparencyIndex IM_BYTE (1)
262
+ XScreen, YScreen IM_USHORT (1) screen position
263
+ UserInput IM_BYTE (1) [1, 0]
264
+ Disposal (string) [UNDEF, LEAVE, RBACK, RPREV]
265
+ Delay IM_USHORT (1)
266
+ Iterations IM_USHORT (1) (NETSCAPE2.0 Application Extension)
267
+
268
+ Comments:
269
+ Attributes after the last image are ignored.
270
+ Reads GIF87 and GIF89, but writes GIF89 always.
271
+ Ignored attributes: Background Color Index, Pixel Aspect Ratio,
272
+ Plain Text Extensions, Application Extensions...
273
+ \endverbatim
274
+ * \ingroup format */
275
+ void imFormatRegisterGIF(void);
276
+
277
+ /** \defgroup bmp BMP - Windows Device Independent Bitmap
278
+ * \section Description
279
+ *
280
+ * \par
281
+ * Windows Copyright Microsoft Corporation.
282
+ * \par
283
+ * Internal Implementation.
284
+ *
285
+ * \section Features
286
+ *
287
+ \verbatim
288
+ Data Types: Byte
289
+ Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
290
+ Compressions:
291
+ NONE - no compression [default]
292
+ RLE - Run Lenght Encoding (only for MAP and Gray)
293
+ Only one image.
294
+ Can have an alpha channel (only for RGB)
295
+ Internally the components are always packed.
296
+ Lines arranged from top down to bottom or bottom up to top. But are saved always as bottom up.
297
+
298
+ Attributes:
299
+ ResolutionUnit (string) ["DPC", "DPI"]
300
+ XResolution, YResolution IM_FLOAT (1)
301
+
302
+ Comments:
303
+ Reads OS2 1.x and Windows 3, but writes Windows 3 always.
304
+ Version 4 and 5 BMPs are not supported.
305
+ \endverbatim
306
+ * \ingroup format */
307
+ void imFormatRegisterBMP(void);
308
+
309
+ /** \defgroup ras RAS - Sun Raster File
310
+ * \section Description
311
+ *
312
+ * \par
313
+ * Copyright Sun Corporation.
314
+ * \par
315
+ * Internal Implementation.
316
+ *
317
+ * \section Features
318
+ *
319
+ \verbatim
320
+ Data Types: Byte
321
+ Color Spaces: Gray, RGB, MAP and Binary
322
+ Compressions:
323
+ NONE - no compression [default]
324
+ RLE - Run Lenght Encoding
325
+ Only one image.
326
+ Can have an alpha channel (only for IM_RGB)
327
+ Internally the components are always packed.
328
+ Internally the lines are arranged from top down to bottom.
329
+
330
+ Attributes:
331
+ none
332
+ \endverbatim
333
+ * \ingroup format */
334
+ void imFormatRegisterRAS(void);
335
+
336
+ /** \defgroup led LED - IUP image in LED
337
+ * \section Description
338
+ *
339
+ * \par
340
+ * Copyright Tecgraf/PUC-Rio and PETROBRAS/CENPES.
341
+ * \par
342
+ * Internal Implementation.
343
+ *
344
+ * \section Features
345
+ *
346
+ \verbatim
347
+ Data Types: Byte
348
+ Color Spaces: MAP only (Gray and Binary saved as MAP)
349
+ Compressions:
350
+ NONE - no compression [default]
351
+ Only one image.
352
+ No alpha channel.
353
+ Internally the lines are arranged from top down to bottom.
354
+
355
+ Attributes:
356
+ none
357
+
358
+ Comments:
359
+ LED file must start with "LEDImage = IMAGE[".
360
+ \endverbatim
361
+ * \ingroup format */
362
+ void imFormatRegisterLED(void);
363
+
364
+ /** \defgroup sgi SGI - Silicon Graphics Image File Format
365
+ * \section Description
366
+ *
367
+ * \par
368
+ * SGI is a trademark of Silicon Graphics, Inc.
369
+ * \par
370
+ * Internal Implementation.
371
+ *
372
+ * \section Features
373
+ *
374
+ \verbatim
375
+ Data Types: Byte and UShort
376
+ Color Spaces: Gray and RGB (Binary saved as Gray, MAP with fixed palette when reading only)
377
+ Compressions:
378
+ NONE - no compression [default]
379
+ RLE - Run Lenght Encoding
380
+ Only one image.
381
+ Can have an alpha channel (only for IM_RGB)
382
+ Internally the components are always packed.
383
+ Internally the lines are arranged from bottom up to top.
384
+
385
+ Attributes:
386
+ Description (string)
387
+ \endverbatim
388
+ * \ingroup format */
389
+ void imFormatRegisterSGI(void);
390
+
391
+ /** \defgroup pcx PCX - ZSoft Picture
392
+ * \section Description
393
+ *
394
+ * \par
395
+ * Copyright ZSoft Corporation. \n
396
+ * ZSoft (1988) PCX Technical Reference Manual.
397
+ * \par
398
+ * Internal Implementation.
399
+ *
400
+ * \section Features
401
+ *
402
+ \verbatim
403
+ Data Types: Byte
404
+ Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
405
+ Compressions:
406
+ NONE - no compression
407
+ RLE - Run Lenght Encoding [default - since uncompressed PCX is not well supported]
408
+ Only one image.
409
+ No alpha channel.
410
+ Internally the components are always packed.
411
+ Internally the lines are arranged from top down to bottom.
412
+
413
+ Attributes:
414
+ ResolutionUnit (string) ["DPC", "DPI"]
415
+ XResolution, YResolution IM_FLOAT (1)
416
+ XScreen, YScreen IM_USHORT (1) screen position
417
+
418
+ Comments:
419
+ Reads Versions 0-5, but writes Version 5 always.
420
+ \endverbatim
421
+ * \ingroup format */
422
+ void imFormatRegisterPCX(void);
423
+
424
+ /** \defgroup tga TGA - Truevision Graphics Adapter File
425
+ * \section Description
426
+ *
427
+ * \par
428
+ * Truevision TGA File Format Specification Version 2.0 \n
429
+ * Technical Manual Version 2.2 January, 1991 \n
430
+ * Copyright 1989, 1990, 1991 Truevision, Inc.
431
+ * \par
432
+ * Internal Implementation.
433
+ *
434
+ * \section Features
435
+ *
436
+ \verbatim
437
+ Supports 8 bits per component only. Data type is always Byte.
438
+ Color Spaces: Gray, RGB and MAP (Binary saved as Gray)
439
+ Compressions:
440
+ NONE - no compression [default]
441
+ RLE - Run Lenght Encoding
442
+ Only one image.
443
+ No alpha channel.
444
+ Internally the components are always packed.
445
+ Internally the lines are arranged from bottom up to top or from top down to bottom.
446
+
447
+ Attributes:
448
+ XScreen, YScreen IM_USHORT (1) screen position
449
+ Title, Author, Description, JobName, Software (string)
450
+ SoftwareVersion (read only) (string)
451
+ DateTimeModified (string) [when writing uses the current system time]
452
+ Gamma IM_FLOAT (1)
453
+ \endverbatim
454
+ * \ingroup format */
455
+ void imFormatRegisterTGA(void);
456
+
457
+ /** \defgroup pnm PNM - Netpbm Portable Image Map
458
+ * \section Description
459
+ *
460
+ * \par
461
+ * PNM formats Copyright Jef Poskanzer
462
+ * \par
463
+ * Internal Implementation.
464
+ *
465
+ * \section Features
466
+ *
467
+ \verbatim
468
+ Data Types: Byte and UShort
469
+ Color Spaces: Gray, RGB and Binary
470
+ Compressions:
471
+ NONE - no compression [default]
472
+ ASCII (textual data)
473
+ Can have more than one image, but sequencial access only.
474
+ No alpha channel.
475
+ Internally the components are always packed.
476
+ Internally the lines are arranged from top down to bottom.
477
+
478
+ Attributes:
479
+ Description (string)
480
+
481
+ Comments:
482
+ In fact ASCII is an expansion...
483
+ \endverbatim
484
+ * \ingroup format */
485
+ void imFormatRegisterPNM(void);
486
+
487
+ /** \defgroup ico ICO - Windows Icon
488
+ * \section Description
489
+ *
490
+ * \par
491
+ * Windows Copyright Microsoft Corporation.
492
+ * \par
493
+ * Internal Implementation.
494
+ *
495
+ * \section Features
496
+ *
497
+ \verbatim
498
+ Data Types: Byte
499
+ Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
500
+ Compressions:
501
+ NONE - no compression [default]
502
+ Can have more than one image. But writing is limited to 5 images,
503
+ and all images must have different sizes and bpp.
504
+ Can have an alpha channel (only for RGB)
505
+ Internally the components are always packed.
506
+ Internally the lines are arranged from bottom up to top.
507
+
508
+ Attributes:
509
+ TransparencyIndex IM_BYTE (1 or N)
510
+
511
+ Comments:
512
+ If the user specifies an alpha channel, the AND mask is loaded as alpha if
513
+ the file color mode does not contain the IM_ALPHA flag.
514
+ For MAP imagens, if the user does not specifies an alpha channel
515
+ the TransparencyIndex is used to initialize the AND mask when writing,
516
+ and if the user does specifies an alpha channel
517
+ the most repeated index with transparency will be the transparent index.
518
+ Although any size and common bpp can be used is recomended to use the typical configurations:
519
+ 16x16, 32x32, 48x48, 64x64 or 96x96
520
+ 2 colors, 16 colors, 256 colors, 24bpp or 32bpp
521
+ \endverbatim
522
+ * \ingroup format */
523
+ void imFormatRegisterICO(void);
524
+
525
+ /** \defgroup krn KRN - IM Kernel File Format
526
+ * \section Description
527
+ *
528
+ * \par
529
+ * Textual format to provied a simple way to create kernel convolution images.
530
+ * \par
531
+ * Internal Implementation.
532
+ *
533
+ * \section Features
534
+ *
535
+ \verbatim
536
+ Data Types: Byte, Int
537
+ Color Spaces: Gray
538
+ Compressions:
539
+ NONE - no compression [default]
540
+ Only one image.
541
+ No alpha channel.
542
+ Internally the lines are arranged from top down to bottom.
543
+
544
+ Attributes:
545
+ Description (string)
546
+
547
+ Comments:
548
+ The format is very simple, inspired by PNM.
549
+ It was developed because PNM does not have support for INT and FLOAT.
550
+ Remeber that usually convolution operations use kernel size an odd number.
551
+
552
+ Format Model:
553
+ IMKERNEL
554
+ Description up to 512 characters
555
+ width height
556
+ type (0 - IM_INT, 1 - IM_FLOAT)
557
+ data...
558
+
559
+ Example:
560
+ IMKERNEL
561
+ Gradian
562
+ 3 3
563
+ 0
564
+ 0 -1 0
565
+ 0 1 0
566
+ 0 0 0
567
+ \endverbatim
568
+ * \ingroup format */
569
+ void imFormatRegisterKRN(void);
570
+
571
+
572
+ #if defined(__cplusplus)
573
+ }
574
+ #endif
575
+
576
+ #endif