diff options
Diffstat (limited to 'html/en')
34 files changed, 3419 insertions, 0 deletions
diff --git a/html/en/.cvsignore b/html/en/.cvsignore new file mode 100644 index 0000000..a761032 --- /dev/null +++ b/html/en/.cvsignore @@ -0,0 +1 @@ +doxygen
\ No newline at end of file diff --git a/html/en/capture.html b/html/en/capture.html new file mode 100644 index 0000000..896b65b --- /dev/null +++ b/html/en/capture.html @@ -0,0 +1,40 @@ +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>Capture</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body bgcolor="#FFFFFF"> + +<h1>Image Capture Overview</h1> + + <p>The capture support is designed for live video, it is not for passive + digital cameras that only transfer the already taken pictures. Are valid: USB + cameras (like most Webcams), Firewire (IEEE 1394) cameras, and analog video + capture boards, including TV Tuners. These are called devices.</p> + <p>The capture functions allows you to:</p> + <ul> + <li>list the available devices</li> + <li>connect to a device</li> + <li>configure the device</li> + <li>retrieve an image</li> + </ul> + <p>You can list the installed devices and once you connect to a specific + device you can control its parameters. Each connected device captures data + frames continuously when in Live state otherwise it stays in standby. You can + connect to more than one device at the same time. </p> + <p>Once connected the user can retrieve frames from the device any time. This + can be done with one function call, or inside a closed loop for several + frames, or inside an idle function to periodically update the screen. The user + is not notified when a new frame is available, but every time the user + retrieve a frame, if successful, it is a new frame, old frames are discarded + when a new frame arrives.</p> + <p>Currently it is implemented only in Microsoft Windows. </p> + + +</body> + +</html> diff --git a/html/en/capture_guide.html b/html/en/capture_guide.html new file mode 100644 index 0000000..b3f84c3 --- /dev/null +++ b/html/en/capture_guide.html @@ -0,0 +1,81 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Capture Guide</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body bgcolor="#FFFFFF"> + +<h1>Capture Guide</h1> +<h3><a name="Using">Using</a></h3> + + <p>You can list the installed capture devices using: </p> + + <pre>int imVideoCaptureDeviceCount(void) +const char* imVideoCaptureDeviceDesc(int device)</pre> + + <p>If a device was removed or added in run time, you must update the list + calling:</p> + + <pre>int imVideoCaptureReloadDevices(void)</pre> + + <p>To handle devices you must create a <b>imVideoCapture</b> structure + using the function <b>imVideoCaptureCreate</b>. With this handle you can + manage any of the available devices, but only one device. The handle must be + destroyed with <b>imVideoCaptureDestroy</b>.</p> + <p>If you want to access two or more devices at the same time you must create + two different structures, but be aware that this usually work for high quality + devices like Firewire and USB 2.0. Webcams that use USB1.x can be used if + connected to different USB 2.0 controllers.</p> + <p>The next thing is to connect to a specific device, because all the other + remaining functions depends on this connection. Just call <b>imVideoCaptureConnect</b> with one of the available capture device numbers.</p> + <p>You control when a device start processing frames using <b>imVideoCaptureLive</b>. Once live the frames can be captured using + <b>imVideoCaptureFrame</b>. Or you can use <b>imVideoCaptureOneFrame</b>, + it will start capturing, returns the captured frame and stop capturing.</p> + <p>But before capturing a frame you may want to configure the device. You can + do it using Attributes, or at least in Windows you can do it using the + configuration dialogs with a call to <b>imVideoCaptureShowDialog</b>.</p> + <p>A very simple sequence of operations to capture just one frame from the + first device available:</p> + + <pre>imVideoCapture* vc = imVideoCaptureCreate(); +if (!imVideoCaptureConnect(vc, 0)) + return; + +int width, height; +imVideoCaptureGetImageSize(vc, &width, &height); + +// initializes the data pointer +void* data = malloc(width*height*3); + +imVideoCaptureOneFrame(vc, data, IM_RGB); +imVideoCaptureDestroy(vc);</pre> + + <p>The capture library is completely independent from the other libraries. It + just uses the same description of the data buffer used in <b>imFileReadImageData</b>.</p> + +<h3><a name="Building">Building</a></h3> + + <p>You should include the <im_capture.h> header and link with the + "im_capture.lib" library. This library is independent of all IM libraries.</p> + <p>To link with the capture library in Windows using Visual C you will need + the file "<a href="../download/strmiids.zip">strmiids.lib</a>". To link it + using Dev-C++ or Mingw 3 you will need the "<b>im_capture.dll</b>".</p> + <p>To compile the capture source code you will need the Direct X 9 SDK. Notice + that since Direct X uses COM, CoInitialize(NULL) is called when the devices + are enumerated.</p> + <p>For more information on Direct X capture, i.e. Direct Show see:</p> + + <p> + <a href="http://msdn.microsoft.com/library/en-us/directx9_c/directX/htm/directshow.asp"> + http://msdn.microsoft.com/library/en-us/directx9_c/directX/htm/directshow.asp</a></p> + + + +</body> + +</html> diff --git a/html/en/capture_samples.html b/html/en/capture_samples.html new file mode 100644 index 0000000..dcf795e --- /dev/null +++ b/html/en/capture_samples.html @@ -0,0 +1,34 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<title>Capture Samples</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Capture Samples</h1> +<h3><a name="glut_capture">Capture and GLUT</a></h3> + + <p>This application uses GLUT and OpenGL to create a window with a canvas and + draw the image into that canvas. But the image is obtained from a capture + device. The image can be processed before display and a sequence of captured + images can be saved in an AVI file during capture.</p> + <p>You can view the source code here: <a href="../download/glut_capture.c"> + glut_capture.c</a></p> + +<h3><a name="iupglcap">Capture and IUP</a></h3> + + <p>This application uses IUP and OpenGL to create a window with two canvases + and draw a video capture image into one canvas. A processed image can be + displayed in the second canvas. It can also process frames from a video file.</p> + <p>You can download the source code and some compiler projects here: + <a href="../download/iupglcap.zip">iupglcap.zip</a></p> + + +</body> + +</html> diff --git a/html/en/copyright.html b/html/en/copyright.html new file mode 100644 index 0000000..83354bd --- /dev/null +++ b/html/en/copyright.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> +<html> +<head> +<meta http-equiv="Content-Language" content="en-us"> +<title>Tecgraf Library License</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> +<body> + +<hr> +<h2>Tecgraf Library License</h2> +<p>The Tecgraf products under this license are: <a href="http://www.tecgraf.puc-rio.br/iup">IUP</a>, +<a href="http://www.tecgraf.puc-rio.br/cd">CD</a> and <a href="http://www.tecgraf.puc-rio.br/im">IM</a>.</p> + +<p>All the products under this license are free software: they can be used for both academic and commercial purposes at +absolutely no cost. There are no paperwork, no royalties, no GNU-like "copyleft" restrictions, +either. Just download and use it. They are licensed under the terms of the +<a HREF="http://www.opensource.org/licenses/mit-license.html">MIT license</a> reproduced below, and so are compatible +with <a HREF="http://www.gnu.org/licenses/gpl.html">GPL</a> and also qualifies as +<a HREF="http://www.opensource.org/docs/definition.html">Open Source</a> software. They are not in the public domain, +<a HREF="http://www.puc-rio.br">PUC-Rio</a> keeps their copyright. The legal details are below. </p> +<p>The spirit of this license is that you are free to use the libraries for any purpose at no cost without having to ask +us. The only requirement is that if you do use them, then you should give us credit by including the copyright notice +below somewhere in your product or its documentation. A nice, but optional, way to give us further credit is to include +a Tecgraf logo and a link to our site in a web page for your product. </p> +<p>The libraries are designed, implemented and maintained by a team at Tecgraf/PUC-Rio in Brazil. The implementation is not derived +from licensed software. The library was developed by request of Petrobras. Petrobras permits Tecgraf to distribute the +library under the conditions here presented.</p> +<hr> +<p>Copyright © 1994-2008 <a HREF="http://www.tecgraf.puc-rio.br">Tecgraf</a>, <a HREF="http://www.puc-rio.br">PUC-Rio</a>.</p> +<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: </p> +<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. </p> +<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p> +<hr> + +</body> + +</html> diff --git a/html/en/cvs.html b/html/en/cvs.html new file mode 100644 index 0000000..753d871 --- /dev/null +++ b/html/en/cvs.html @@ -0,0 +1,22 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> +<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> +<head> +<meta http-equiv="Content-Language" content="en-us"> +<title>CVS</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> +<body> + +<h2 align="center" style="text-align:center">CVS</h2> +<p>The CVS files are in the <b>IM</b> <b>LuaForge</b> site available at:</p> +<p class="info"><a href="http://luaforge.net/scm/?group_id=86"> +http://luaforge.net/scm/?group_id=86</a> +</p> +<p>Current version can be obtained from module "im".</p> +<p>To checkout use:</p> + +<pre>CVSROOT=:pserver:anonymous@cvs.luaforge.net:/cvsroot/imtoolkit</pre> + +</body> + +</html> diff --git a/html/en/download.html b/html/en/download.html new file mode 100644 index 0000000..c509826 --- /dev/null +++ b/html/en/download.html @@ -0,0 +1,30 @@ +<html> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Download</title> +<meta http-equiv="Content-Language" content="en-us"> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body bgcolor="white" lang="EN-US" link="blue" vlink="blue"> + +<h1 style="text-align:center">Download</h1> + + <p>The main download site is the <b>LuaForge</b> site available at:</p> + + <p class="info"><a href="http://luaforge.net/project/showfiles.php?group_id=86"> + http://luaforge.net/project/showfiles.php?group_id=86</a> </p> + + <p>Before downloading any precompiled binaries, you should read before the + <a href="download_tips.html">Tecgraf Library Download Tips</a>.</p> + <p>Some other files are available directly at the <b>IM</b> download folder:</p> + + <p class="info"><a href="http://www.tecgraf.puc-rio.br/im/download/"> + http://www.tecgraf.puc-rio.br/im/download/</a> </p> + + + +</body> + +</html> diff --git a/html/en/download_tips.html b/html/en/download_tips.html new file mode 100644 index 0000000..b999eae --- /dev/null +++ b/html/en/download_tips.html @@ -0,0 +1,363 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> +<head> +<meta http-equiv="Content-Language" content="en-us"> +<title>Library Download Tips</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +<base target="_blank"> +<style type="text/css"> +.style1 { + font-family: Tahoma; +} +</style> +</head> +<body> + +<h1>Tecgraf/PUC-Rio Library Download Tips</h1> +<p>All the libraries were build using <b>Tecmake</b>. Please use it if you intend to recompile the sources. +<b>Tecmake</b> + can be found at +<a target="_blank" href="http://www.tecgraf.puc-rio.br/tecmake">http://www.tecgraf.puc-rio.br/tecmake</a>.</p> +<p class="info">The <b>IM</b> files can be downloaded at +<a href="http://luaforge.net/project/showfiles.php?group_id=86">http://luaforge.net/project/showfiles.php?group_id=86</a>.<br> + The <b>CD</b> files can be downloaded at +<a href="http://luaforge.net/project/showfiles.php?group_id=88">http://luaforge.net/project/showfiles.php?group_id=88</a>.<br> + The <b>IUP</b> files can be downloaded at +<a href="http://luaforge.net/project/showfiles.php?group_id=89">http://luaforge.net/project/showfiles.php?group_id=89</a>.<br> + The <b>Lua</b> files can be downloaded at +<a href="http://luaforge.net/project/showfiles.php?group_id=110">http://luaforge.net/project/showfiles.php?group_id=110</a>.</p> +<h3><a name="build">Build Configuration</a></h3> +<p>Libraries and executables were built using speed optimization. In UNIX the dynamic libraries were NOT built with + the -fpic parameter. In MacOS X the dynamic libraries are in bundle format. The source code along with the + "config.mak" files for <b>Tecmake</b> are also available.</p> +<p>The DLLs were built using the <b>cdecl</b> calling convention. This should be +a problem for Visual Basic users.</p> +<p>In Visual C++ we use the single thread C Run Time Library for static libraries and the multi thread C RTL for DLLs. + Because this is the default in Visual Studio for new projects. In Visual C++ 8 both use the multi thread C RTL.</p> +<h3><a name="pack">Packaging</a></h3> +<p>The package files available for download are named according to the platform where they were build.</p> +<p>In UNIX all strings are based in the result of the command "uname -a". The package name is a concatenation of the + platform <b>uname</b>, the system <b>major</b> version number and the system +<b>minor</b> version number. Some times a + suffix must be added to complement the name. The default compiler is gcc, if the native compiler is used the name + receive the suffix "cc". Binaries for 64-bits receive the suffix: "_64". In Linux when gcc is changed for the same + uname in a new platform the major version number of the compiler is added as a suffix: "g3" for gcc 3 and "g4" for gcc + 4.</p> +<p>In Windows the platform name is the <b>compiler</b> and its <b>major</b> version number. +</p> +<p>All library packages contains binaries for the specified platform and includes. Packages with "_bin" suffix + contains executables only.</p> +<p>The package name is a general reference for the platform. If you have the same platform it will work fine, but it + may also work in similar platforms.</p> +<p>Here are some examples of packages:</p> +<p class="info"><b>iup2_4_AIX43_64_bin.tar.gz</b> = IUP 2.4 64-bits Executables for AIX version 4.3<br> +<b>iup2_4_Linux26g4_lib.tar.gz</b> = IUP 2.4 32-bits Libraries and Includes for Linux with Kernel version 2.6 built with + gcc 4.<br> +<b>iup2_4_Win32_vc7_lib.tar.gz</b> = IUP 2.4 32-bits Libraries and Includes for Windows to use with Visual C++ 7.<br> +<b>iup2_4_Docs_html.tar.gz</b> = IUP 2.4 documentation files in HTML format (the web site files can be browsed + locally).<br> +<b>iup2_4_Win32_bin.tar.gz</b> = IUP 2.4 32-bits Executables for Windows.</p> +<p>The documentation files are in HTML format. They do not include the CHM and PDF versions. These two files are + provided only as a separate download, but they all have the same documentation.</p> +<h3><a name="install">Installation</a></h3> +<p>For any platform we recommend you to create a folder to contain the third party libraries you download. Then just + unpack the packages you download in that folder. The packages already contains a directory structure that separates + each library or toolkit. For example:</p> +<pre>\mylibs\ + iup\ + bin\ + html\ + include\ + lib\Linux26 + lib\vc7 + src + cd\ + im\ + lua5\</pre> +<p>This structure will also made the process of building from sources more simple, since the projects and makefiles + will assume this structure .</p> +<h3><a name="usage">Usage</a></h3> +<p>For makefiles use:</p> +<pre>1) "-I/mylibs/iup/include" to find include files +2) "-L/mylibs/iup/lib/Linux26" to find library files +3) "-liup" to specify the library files</pre> +<p>For IDEs the configuration involves the same 3 steps above, but each IDE has a different dialog. The IUP toolkit + has a Guide for some IDEs:</p> +<p class="info"><strong>Open Watcom</strong> - <a href="http://www.tecgraf.puc-rio.br/iup/en/guide/owc.html">http://www.tecgraf.puc-rio.br/iup/en/guide/owc.html</a> +<br> + <strong>Dev-C++</strong> - <a href="http://www.tecgraf.puc-rio.br/iup/en/guide/dev-cpp.html">http://www.tecgraf.puc-rio.br/iup/en/guide/dev-cpp.html</a> +<br> + <strong>Borland C++ BuilderX</strong> - +<a href="http://www.tecgraf.puc-rio.br/iup/en/guide/cppbx.html">http://www.tecgraf.puc-rio.br/iup/en/guide/cppbx.html</a><br> + <strong>Microsoft Visual C++</strong> (Visual Studio 2003) - +<a href="http://www.tecgraf.puc-rio.br/iup/en/guide/msvc.html">http://www.tecgraf.puc-rio.br/iup/en/guide/msvc.html</a><br> + <strong>Microsoft Visual C++</strong> (Visual Studio 2005) - +<a href="http://www.tecgraf.puc-rio.br/iup/en/guide/msvc8.html">http://www.tecgraf.puc-rio.br/iup/en/guide/msvc8.html</a><br> +<strong>Eclipse for C++</strong> - +<a href="http://www.tecgraf.puc-rio.br/iup/en/guide/eclipse.html"> +http://www.tecgraf.puc-rio.br/iup/en/guide/eclipse.html</a> +</p> +<h3><a name="plat">Available Platforms</a></h3> +<table border="0" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" align="center"> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>AIX43</b></td> + <td bgcolor="#DDDDDD"> IBM AIX 4.3 (ppc) / gcc 2.95 / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>AIX43cc</b></td> + <td bgcolor="#DDDDDD"> IBM AIX 4.3 (ppc) / cc 4.4 / Motif 2.1 </td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>AIX43_64</b></td> + <td bgcolor="#DDDDDD"> IBM AIX 4.3 (ppc) (64 bits libraries) / cc 4.4 / Motif 2.1</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>IRIX65</b></td> + <td bgcolor="#C0C0C0"> SGI IRIX 6.5 (mips) / gcc 3.0 / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>IRIX6465</b></td> + <td bgcolor="#C0C0C0"> SGI IRIX 6.5 (mips) / gcc 3.3 / Motif 1.2</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>IRIX6465cc</b></td> + <td bgcolor="#C0C0C0"> SGI IRIX 6.5 (mips) / cc MIPSpro 7.4 / Motif 1.2 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>IRIX6465_64</b></td> + <td bgcolor="#C0C0C0"> SGI IRIX 6.5 (mips) (64 bits libraries) / cc MIPSpro 7.4 / Motif 1.2</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Linux24</b></td> + <td bgcolor="#DDDDDD"> Red Hat 7.3 (x86) / Kernel 2.4 / gcc 2.95 / Open Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Linux24g3</b></td> + <td bgcolor="#DDDDDD"> CentOS 3.9 (x86) / Kernel 2.4 / gcc 3.2 / Open Motif 2.2 + <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Linux24g3_64 </b></td> + <td bgcolor="#DDDDDD"> Red Hat E.L. WS 3 (x64) (64 bits libraries) / Kernel 2.4 / gcc 3.2 / Open Motif + 2.2 <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Linux26</b></td> + <td bgcolor="#DDDDDD"> CentOS 4.5 (x86) / Kernel 2.6 / gcc 3.4 / Open Motif 2.2 + <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Linux26_64</b></td> + <td bgcolor="#DDDDDD"> CentOS 4.5 (x64) / Kernel 2.6 / gcc 3.4 / Open Motif 2.2 + <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Linux26g4</b></td> + <td bgcolor="#DDDDDD"> Ubuntu 6.06 (x86) / Kernel 2.6 / gcc 4.0 / Open Motif + 2.2 <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><strong>Linux26g4_64</strong></td> + <td bgcolor="#DDDDDD"> Ubuntu 6.10 (x64) / Kernel 2.6 / gcc 4.1 / + OpenMotif 2.2 <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Linux26g4ppc</b></td> + <td bgcolor="#DDDDDD"> Ubuntu 7.10 (ppc) / Kernel 2.6 / gcc 4.1 / Open Motif 2.2 + <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><strong>Linux26_ia64</strong></td> + <td bgcolor="#DDDDDD"> Red Hat E.L. AS 4 (ia64) / Kernel 2.6 / gcc 3.4 / + Open Motif 2.2 <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>SunOS57</b></td> + <td bgcolor="#C0C0C0"> Sun Solaris 7 (sparc) / gcc 2.95 / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>SunOS57cc</b></td> + <td bgcolor="#C0C0C0"> Sun Solaris 7 (sparc) / cc 5.2 (Sun WorkShop 6 update 1) / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>SunOS57_64</b></td> + <td bgcolor="#C0C0C0"> Sun Solaris 7 (sparc) (64 bits libraries) / cc 5.2 (Sun WorkShop 6 update 1) / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>SunOS58</b></td> + <td bgcolor="#C0C0C0"> Sun Solaris 8 (sparc) / gcc 3.4 / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>SunOS58cc</b></td> + <td bgcolor="#C0C0C0"> Sun Solaris 8 (sparc) / Sun WorkShop 6 update 2 C++ 5.3 / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>SunOS58_64</b></td> + <td bgcolor="#C0C0C0"> Sun Solaris 8 (sparc) / Sun WorkShop 6 update 2 C++ 5.3 / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><strong>SunOS510x86</strong></td> + <td bgcolor="#C0C0C0"> Sun Solaris 10 (x86) / gcc 3.3 / Motif 2.1 + </td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>FreeBSD54</b></td> + <td bgcolor="#DDDDDD"> Free BSD 5.4 (x86) / gcc 3.4 / Open Motif 2.2 + <sup><span class="style1">3</span></sup></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>HP-UXB11</b></td> + <td bgcolor="#DDDDDD"> HP-UX 11 (9000) / HP ANSI C++ B3910B / Motif 2.1</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Darwin811</b></td> + <td bgcolor="#C0C0C0"> Mac OS X 10.4.11 (ppc) / Darwin Kernel Version 8.11 / gcc 4.0 / + <a href="http://www.ist-inc.com/DOWNLOADS/motif_download.html">Open Motif 2.1</a></td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Darwin811x86</b></td> + <td bgcolor="#C0C0C0"> Mac OS X 10.4.11 (x86) / Darwin Kernel Version 8.11 / gcc 4.0 / + <a href="http://www.ist-inc.com/DOWNLOADS/motif_download.html">Open Motif 2.1</a></td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win32_vc6</b></td> + <td bgcolor="#DDDDDD"> Microsoft Visual C++ 6 (static RTL/single thread)</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win32_vc7</b></td> + <td bgcolor="#DDDDDD"> Microsoft Visual C++ 7.1 (.NET 2003) (static RTL/single thread)<br> + Also compatible with Microsoft Visual C++ Toolkit 2003 -<br> + <a href="http://msdn.microsoft.com/visualc/vctoolkit2003/" style="text-decoration: none">http://msdn.microsoft.com/visualc/vctoolkit2003/</a> + ¹</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win32_vc8</b></td> + <td bgcolor="#DDDDDD"> Microsoft Visual C++ 8.0 (2005) (static RTL/multithread)<br> + Also compatible with Microsoft Visual C++ 2005 Express Edition -<br> + <a style="text-decoration: none" href="http://msdn.microsoft.com/vstudio/express/visualc/">http://msdn.microsoft.com/vstudio/express/visualc/</a> + ¹</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win32_vc9</b></td> + <td bgcolor="#DDDDDD"> Microsoft Visual C++ 9.0 (2008) (static RTL/multithread)<br> + Also compatible with Microsoft Visual C++ 2008 Express Edition -<br> + <a style="text-decoration: none" href="http://msdn.microsoft.com/vstudio/express/visualc/">http://msdn.microsoft.com/vstudio/express/visualc/</a> + ¹</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_dll</b></td> + <td bgcolor="#C0C0C0"> built using vc6, creates dependency with MSVCRT.DLL<br> + (either other libraries or new applications).</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_dll7</b></td> + <td bgcolor="#C0C0C0"> built using vc7, creates dependency with MSVCR71.DLL<br> + (either other libraries or new applications).</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_dll8</b></td> + <td bgcolor="#C0C0C0"> built using vc8, creates dependency with MSVCR80.DLL<br> + (either other libraries or new applications).</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_dll9</b></td> + <td bgcolor="#C0C0C0"> built using vc9, creates dependency with MSVCR90.DLL<br> + (either other libraries or new applications).</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win64_vc8</b></td> + <td bgcolor="#DDDDDD"> Same as <b>Win32_vc8</b> but for 64-bits + systems using x64 standard.</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win64_vc9</b></td> + <td bgcolor="#DDDDDD"> Same as <b>Win32_vc9</b> but for 64-bits + systems using x64 standard.</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win64_dll8</b></td> + <td bgcolor="#DDDDDD"> Same as <b>Win32_dll8</b> but for 64-bits + systems using x64 standard.</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win64_dll9</b></td> + <td bgcolor="#DDDDDD"> Same as <b>Win32_dll9</b> but for 64-bits + systems using x64 standard.</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_gcc3</b></td> + <td bgcolor="#C0C0C0"> Cygwin gcc 3.4 (Depends on Cygwin DLL 1.5) - + <a href="http://www.cygwin.com/" style="text-decoration: none">http://www.cygwin.com/</a> + ¹</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_cygw15</b></td> + <td bgcolor="#C0C0C0"> Same as <b>Win32_gcc3</b>, but using the Cygwin Posix + system</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_mingw3</b></td> + <td bgcolor="#C0C0C0"> MingW gcc 3.4 - + <a href="http://www.mingw.org/" style="text-decoration: none">http://www.mingw.org/</a> + ¹<br> + Also compatible with Dev-C++ - + <a href="http://www.bloodshed.net/devcpp.html" style="text-decoration: none">http://www.bloodshed.net/devcpp.html</a> + ¹</td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_mingw4</b></td> + <td bgcolor="#C0C0C0"> MingW gcc 4.x (unofficial) - + <a href="http://www.develer.com/oss/GccWinBinaries" style="text-decoration: none">http://www.develer.com/oss/GccWinBinaries</a> + ¹</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win32_owc1</b></td> + <td bgcolor="#DDDDDD"> Open Watcom 1.5 - + <a href="http://www.openwatcom.org/" style="text-decoration: none">http://www.openwatcom.org/</a></td> + </tr> + <tr> + <td bgcolor="#C0C0C0" align="right"><b>Win32_bc56</b></td> + <td bgcolor="#C0C0C0"> Borland C++ BuilderX 1.0 / Borland C++ 5.6 Compiler - + <br /> + <a href="http://www.borland.com/products/downloads/download_cbuilderx.html" style="text-decoration: none">http://www.borland.com/products/downloads/download_cbuilderx.html</a> + <font face="Times New Roman">¹,²</font><br> + (the C++ BuilderX IDE can also be configured to use mingw3 or gcc3 versions.) + </td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win32_bin</b></td> + <td bgcolor="#DDDDDD"> Executables only for Windows NT/2000/XP</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><b>Win64_bin</b></td> + <td bgcolor="#DDDDDD"> Same as <b>Win32_bin</b> but for 64-bits systems + using the x64 standard</td> + </tr> + <tr> + <td bgcolor="#DDDDDD" align="right"><strong>Win32_cygw15_bin</strong></td> + <td bgcolor="#DDDDDD"> Executables only for Windows NT/2000/XP, but + using the Cygwin Posix system</td> + </tr> +</table> + + <p>¹ - Notice that all the Windows + compilers with links here are free to download and use. <br> + ² - Recently Borland removed the C++ Builder X + from download. But if you bought a book that has the CD of the compiler, then + it is still free to use.<br> + <sup><span class="style1">3</span></sup> - OpenMotif 2.2 is classified as + 'experimental' by the Open Group. </p> + + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/guide.html b/html/en/guide.html new file mode 100644 index 0000000..c4ea993 --- /dev/null +++ b/html/en/guide.html @@ -0,0 +1,282 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<title>Guide</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +<style type="text/css"> +.style1 { + color: #FF0000; +} +.style2 { + color: #008000; +} +.style3 { + color: #0000FF; +} +</style> +</head> + +<body> + +<h1>Guide</h1> +<h3><a name="startup">Getting Started</a></h3> + + <p>It is important to understand that IM is based in 4 concepts: <b>Image Representation</b>, <b>Image Storage</b>, <b> + Image Processing</b> and <b>Image Capture</b>. The following picture illustrates the relation between theses concepts.</p> + <p align="center"><img border="0" src="imaging.gif" width="704" height="346"></p> + <p>IM does not have support for <b>Image Visualization</b>, because we think this is a task for a graphics library + like OpenGL, Windows GDI or <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd/">CD + - Canvas Draw</a>.</p> + <p><b>Image Representation</b> describes the image model and its details. Which color systems are going to be used, + which data types, how the data is organized in memory, and how other image characteristics are accessed.</p> + <p><b>Image Storage</b> describers the file format model and how images are obtained or saved. <b>Image Capture</b> + describes the access to a capture device and obtaining an image from it. <b>Image Processing</b> describes the image + processing operations.</p> + <p>There are infinite ways to implement these concepts. There is no common definition in the literature, but there is + a standard called Programmer's Imaging Kernel System (PIKS) published at the ISO/IEC 12087. PIKS is a very complete + and also complex standard, very hard to implement. There are only a few implementations available, and the one that I + know is commercial software, Pixel Soft of William Pratt <a target="_blank" href="http://www.pixelsoft.com/"> + http://www.pixelsoft.com/</a>, also author of several books on the subject.</p> + <p>But we want something easier to implement and understand. The free available libraries that we found where + sometimes close to what we want, sometimes very far. So we developed our own. </p> + <p>The documentation contains <b>Overview, Guide, Samples</b> and <b>Reference</b> sections for each one of the IM + concepts. </p> + <p>The <b>Guide</b> is where you are going to find the explanation about the concepts and decisions made during the + library design. It is the best place to understand how things works. </p> + <p>The <b>Reference</b> contains pure essential information for function and structure usage. But there is no + information on how to put the functions to work together. It is generated automatically from the source code using + Doxygen, this means also that the include files (*.h) are very well commented.</p> + +<h3><a name="buildapp">Building Applications</a></h3> + + <p>Inside you code you should at least include the <im.h> header and link with the "im.lib/libim.a/libim.so" library. + This library contains all the <b>Image Representation</b> functions and all the <b>Image Storage</b> functions (with + the exception of the external formats: AVI, JP2 and WMV).</p> + <p>Each external format or processing usually needs a <im_xx.h> file and a "im_xx.lib/libim_xx.a/libim_xx.so" file.</p> + <p>Even if your applicattion is only in C, you must link with a C++ capable linker. Using Tecmake set "LINKER := g++" + in your "config.mak" when compiling with gcc (UNIX and Windows).</p> + <p>The download files list includes the <a href="download_tips.html">Tecgraf/PUC-Rio Library Download Tips</a> + document, with a description of all the available binaries.</p> + +<h3 align="left"><a name="buildlib">Building the Library</a> </h3> + +<p>In the Downloads you will ne able to find pre-compiled binaries for many +platforms, all those binaries were built using Tecmake. Tecmake is a command line multi compiler build tool +based on GNU make, available at + <a target="_blank" href="http://www.tecgraf.puc-rio.br/tecmake">http://www.tecgraf.puc-rio.br/tecmake</a>. Tecmake is + used by all the Tecgraf libraries and many applications.</p> +<p>In UNIX, you do not need to install Tecmake, a compact version of Tecmake for +UNIX is already included in the source code package. Just type "make" in the +command line on the "src" folder and all libraries and executables will be +build. +</p> +<p>In Windows, the easiest way to build everything is to install the Tecmake tool into your system. It is easy and helps a lot. + The Tecmake configuration files (*.mak) available at the "src" folder are very easy to understand also. +Also there are files named +<i>make_uname.bat</i> that build the libraries using <b>Tecmake</b>. To build for Windows using + Visual C 7.0 (2005) for example, just execute <i>"make_uname vc7"</i> , or the +DLLs with Visual C++ 9 (2008) type <i>"make_uname dll9"</i>. The Visual +Studio workspaces with the respective projects available in the source package +is for debugging purposes only.</p> +<p>Make sure you have all the dependencies for the library you want installed, +see the documentation bellow.</p> +<p>If you are going to build all the libraries, +the makefiles and projects expect the following directory tree:</p> +<pre>\mylibs\ + im\ + lua5.1\</pre> +<h4>Libraries Dependencies</h4> +<pre>im -> <span class="style2"><strong>libjpeg</strong></span> (included) + -> <strong><span class="style2">libpng</span></strong> (included) + -> <strong><span class="style2">libtiff</span></strong> (included) + -> <strong><span class="style2">zlib</span></strong> (included) + -> <strong><span class="style2">liblzf</span></strong> (included) + -> <strong><span class="style2">libexif</span></strong> (included) +im_jp2 -> im + -> <strong><span class="style2">libJasper</span></strong> (included) +im_avi -> im + -> <span class="style3"><strong>vfw32</strong></span> (system - Windows) +im_wmv -> im + -> <strong><span class="style3">wmvcore</span></strong> (system - Windows) +im_ecw -> im + -> <strong><span class="style3">NCSEcw</span></strong> (system) +im_capture -> <strong><span class="style3">strmiids</span></strong> (system - Windows) +im_process -> im +im_fftw -> im + -> <strong><span class="style2">fftw</span></strong> (included) +imlua51 -> im + -> <span class="style1"><strong>lua5.1</strong></span> +imlua_capture51 -> imlua51 + -> im_capture +imlua_fftw51 -> imlua51 + -> im_fftw +imlua_process51 -> imlua51 + -> im_process</pre> +<p>As a general rule (excluding system dependencies and included third party +libraries): IM has NO external dependencies, and IMLua depends on Lua.</p> + +<h3><a name="CD">CD Compatibility</a></h3> + + <p>IM version 2 was designed to perfectly work with the <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd/">CD + - Canvas Draw</a> toolkit. Version 3 has many more options and only for a subset of the images called Bitmaps can be + used with the CD functions. Theses images have data type <b>IM_BYTE</b>, and color mode + <b>IM_RGB, IM_GRAY, + IM_MAP</b> or <b>IM_BINARY</b>. They can not have the flags <b>IM_TOPDOWN</b> and + <b>IM_PACKED</b>. + But it can have the flag <b>IM_ALPHA</b> for <b>IM_RGB</b> images.</p> + <p>You can convert an image to a bitmap version of it using the function <b>imConvertToBitmap</b>, see + <a href="doxygen/group__convert.html">Image Representation / Conversion</a>.</p> + <p>Function <strong>cdCanvasGetImageRGB</strong> captures an image from the active canvas. Functions + <strong>cdCanvasPutImageRect*</strong> draw a client image on the active canvas. These + functions allow reducing or increasing the image when drawing.</p> + <p align="left">For applications in systems with only 256 colors available, we recommend the use of function <strong> + cdCanvasPalette</strong> before drawing the image, to improve its quality.</p> + <p align="left">When using the imImage structure the macro <strong> + imcdCanvasPutImage</strong> can be used. It is defined as:</p> + <div align="left"> + + <pre>#define imcdCanvasPutImage(_canvas, _image, _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax) \ + { \ + if (_image->color_space == IM_RGB) \ + { \ + if (image->has_alpha) \ + cdCanvasPutImageRectRGBA(_canvas, _image->width, _image->height, \ + (unsigned char*)_image->data[0], \ + (unsigned char*)_image->data[1], \ + (unsigned char*)_image->data[2], \ + (unsigned char*)_image->data[3], \ + _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ + else \ + cdCanvasPutImageRectRGB(_canvas, _image->width, _image->height, \ + (unsigned char*)_image->data[0], \ + (unsigned char*)_image->data[1], \ + (unsigned char*)_image->data[2], \ + _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ + } \ + else \ + cdCanvasPutImageRectMap(_canvas, _image->width, _image->height, \ + (unsigned char*)_image->data[0], _image->palette, \ + _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ + }</pre> + + </div> + <p align="left">CD Library is the Tecgraf 2D graphics library available at + <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd">http://www.tecgraf.puc-rio.br/cd</a>.</p> + +<h3><a name="opengl">OpenGL Compatibility</a></h3> + + <p>The function <b>glDrawPixels</b> accepts several data types and color modes. Here are the <b>format</b> and + <b>type</b> mapping for OpenGL usage:</p> + + <pre> <b>IM</b> <-> <b>OpenGL</b></pre> + <pre> <b>color_mode format</b> +IM_RGB|IM_ALPHA|IM_PACKED = GL_RGBA +IM_RGB|IM_PACKED = GL_RGB +IM_GRAY = GL_LUMINANCE +IM_GRAY|IM_ALPHA|IM_PACKED = GL_LUMINANCE_ALPHA</pre> + <pre> <b>data_type type</b> +IM_BYTE = GL_UNSIGNED_BYTE +IM_BINARY = GL_BITMAP +IM_USHORT = GL_UNSIGNED_SHORT +IM_INT = GL_INT +IM_FLOAT = GL_FLOAT</pre> + + <p>There is no mapping for non <b>IM_PACKED</b> images so if you use unpacked planes (ex: you use the + <b>imImage</b> structure) then you have to convert one data into another, the function + <b>imConvertPacking</b> + does this, so you just have to keep an extra buffer for the display image and call this function only when your + original image has changed. See <a href="doxygen/group__convert.html">Image + Representation / Conversion</a>. For example:</p> + + <pre>imConvertPacking(image->data[0], gl_data, image->width, image->height, image->depth, image->data_type, 0); +glPixelStorei(GL_UNPACK_ALIGNMENT, 1); /* data alignment must be 1 */ + +glDrawPixels(image->width, image->height, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*)gl_data);</pre> + + <p>When loading color image data you can use the function imConvertMapToRGB to convert in-place IM_MAP image data into + IM_RGB after loading it from file. For example:</p> + + <pre>if (imColorSpace(color_mode) == IM_MAP) +{ + long palette[256]; + int palette_count, packed = 1; /* OpenGL uses packed RGB */ + imFileGetPalette(ifile, palette, &palette_count); + imConvertMapToRGB(gl_data, width*height, depth, packed, palette, palette_count); +}</pre> + + <p>If you just want to save your OpenGL buffer then you can use:</p> + + <pre>glPixelStorei(GL_PACK_ALIGNMENT, 1); /* data alignment must be 1 */ +glReadPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*)gl_data); + +ifile = imFileNew(filename, format, &error); +error = imFileWriteImageInfo(ifile, width, height, IM_RGB|IM_PACKED, IM_BYTE); +error = imFileWriteImageData(ifile, gl_data); +imFileClose(ifile); </pre> + + <p>You can also put <b>glReadPixels</b> and <b>imFileWriteImageInfo</b>/<b>imFileWriteImageData</b> + inside a loop to create an animation.</p> + +<h3><a name="compat">IM 2.x Compatibility</a></h3> + + <p>In version 3.0 the library was completely rewritten. And we changed the main API to allow more powerful features. + But the old API is still available for backward compatibility. Version 3 is also binary compatible with version 2. </p> + <p>The only change that must be updated in old applications if they where recompiled is some error code definitions. + If you use them in a case there will cause a compiler error because <b>IM_ERR_READ</b> and + <b>IM_ERR_WRITE</b> + are now defined as <b>IM_ERR_ACCESS</b> both.</p> + +<h3 align="left"><a name="migra">Migrating OLD Code</a> </h3> + + <p>The old API is very inefficient because the file is opened and close three times, for: + <b>imFileInfo</b>, + <b>imImageInfo</b> and <b>imLoadRGB</b>/<b>imLoadMap</b>. There is no room for attributes, so we use + the callbacks. And we can not load sequences of images. For these reasons we change the API. </p> + <p>If you would like to migrate your code using the old API the most important thing to change is the memory + allocation. For RGB images instead of allocating 3 separate pointers you should allocate only one pointer with room + for all three planes. If you still want to keep the three pointers, just do <b>green = red + width*height</b> + and <b>blue = red + 2*width*height</b>.</p> + <p>Also you should change your callbacks usage for attributes access using <b>imFileGetAttribute</b> and + <b>imFileSetAttribute</b>. <b>IM_RESOLUTION_CB</b> is replaced by the attributes "<b>XResolution</b>", "<b>YResolution</b>", + "<b>ResolutionUnit</b>". <b>IM_GIF_TRANSPARENT_COLOR_CB</b> is replaced by "<b>TransparencyIndex</b>" + and <b>IM_TIF_IMAGE_DESCRIPTION_CB</b> by "<b>Description</b>".</p> + <p>Except <b>IM_COUNTER_CB</b> that is not an attribute, still works with a callback, but now we implement a + counter system for all the library including loading, saving and processing. The user just use the + <b>imCounterSetCallback</b> (like before) to register it counter callback, now there are a few more parameters and a + user data pointer. See <a href="doxygen/group__counter.html">Utilities / Counter</a>. + </p> + <p>The function calls to <b>imImageInfo</b> and <b>imLoadRGB</b>/<b>imLoadMap</b> will be replaced + by a sequence of function calls to <b>imFileOpen</b>/<b>imFileNew</b>, + <b>imFileReadImageInfo</b>/<b>imFileWriteImageInfo</b>, + <b>imFileReadImageData</b>/<b>imFileWriteImageData</b> and <b>imFileClose</b>. See + <a href="doxygen/group__file.html">Image Storage</a>.</p> + +<h3><a name="names">Names Convention</a></h3> + + <p>To improve the readability of the code we use a very simple naming convention:</p> + <ul> + <li>Global Functions and Types - "im[Object][Action]" using first capitals (imFileOpen)</li> + <li>Local Functions and Types - "i[Object][Action]" using first capitals (iTIFFGetCompIndex)</li> + <li>Local Static Variables - same as local functions and types (iFormatCount)</li> + <li>Local Static Tables - same as local functions and types with "Table" suffix (iTIFFCompTable)</li> + <li>Variables and Members - no prefix, all lower case (width)</li> + <li>Defines and Enumerations - all capitals (IM_ERR_NONE) </li> + </ul> + +<h3><a name="cpp">C x C++ Usage</a></h3> + + <p>The library main API is in C. We adopt this because of the many C programmers out there. Some of the API is also + available in C++ for those addicted to classes.</p> + <p>Internally C++ is used to implement the format driver base architecture. A virtual base class that every drivers + inherits from. This made a lot of things easier to the driver development. But we keep it simple, no multiple + inheritance, no exception handling, no complicated classes.</p> + <p>But because we need several data types C++ templates were inevitable used (since we do not like long macros + everywhere). But they are used only for processing functions, not classes.</p> + + +</body> + +</html> diff --git a/html/en/history.html b/html/en/history.html new file mode 100644 index 0000000..a030602 --- /dev/null +++ b/html/en/history.html @@ -0,0 +1,347 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<title>History</title> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>History of Changes</h1> +<h3 dir="ltr">Version 3.4 (14/Oct/2008)</h3> +<ul> + <li><span style="color: #0000FF">New:</span> imlua_avi, imlua_wmv and imlua_jp2 libraries so the + repective formats can be dinamically loaded + using require.</li> + <li><span style="color: #FF0000">Fixed:</span> reviewed and fixed the parameter + checking of all IMLua processing functions. Also reviewed all IMLua + parameter checking. Thanks to Lucas Lorensi.</li> + <li><span style="color: #FF0000">Fixed:</span> loading of TIFF format with + old JPEG compression.</li> + <li><span style="color: #FF0000">Fixed:</span> loading and saving of PNM + format when data in textual format and gray values are greatter than 255.</li> + <li><span style="color: #FF0000">Fixed:</span> Bicubic and Zero order + interpolation for all geometric operations for pixels near the image border + when increasing image size.</li> + <li><span style="color: #FF0000">Fixed:</span> Lua samples.</li> + <li><span style="color: #FF0000">Fixed:</span> ICON format in 64 bits Linux.</li> + <li><span style="color: #008000">Changed:</span> All dll8 and dll9 DLLs now + have a Manifest file that specifies the correct MSVCR*.DLL.</li> + <li><span style="color: #008000">Changed:</span> + Makefiles for UNIX now uses a compact version of Tecmake that does not need + any installation, just type "make".</li> + <li><span style="color: #008000">Changed</span>: premake files are used now + only internally and were removed from the distribution.</li> + <li><span style="color: #0000FF"><span style="color: #008000">Changed</span>:</span> + Copyright notice modified to reflect the registration at INPI (National + Institute of Intellectual Property in Brazil). License continues under the + same terms.</li> + <li><span style="color: #0000FF"><span style="color: #008000">Changed</span>:</span> + <strong> + <span style="color: #FF0000">IMPORTANT</span></strong> - + the "imlua_cd" library moved from IM to CD under the name "cdluaim".</li> +</ul> +<h3 dir="ltr">Version 3.3 (26/Nov/2007)</h3> +<ul> + <li><span style="color: #0000FF">New:</span> read support for ECW using the + ERMapper ECW JPEG 2000 SDK.</li> + <li><span style="color: #008000">Changed:</span> libTIFF updated to version + 3.8.2.</li> + <li><span style="color: #008000">Changed:</span> libPNG updated to version + 1.2.22.</li> + <li><span style="color: #008000">Changed:</span> libJasper updated to + libGeoJasper 1.4.0 (using Jasper version 1.900.1). Better support for + counter progress, Geo tags and several speed improvements. New GeoTIFFBox + and XMLPacket attributes.</li> + <li><span style="color: #008000">Changed:</span> renamed macro <b>imPutImage</b> + to <b>imcdCanvasPutImage</b>, and added canvas as the first parameter. </li> + <li><span style="color: #008000">Changed:</span> renamed + the <b>imImage</b> Lua + methods to <i><strong>image</strong></i><b>:cdCanvasPutImageRect</b>, <i> + <strong>image</strong></i><b>:wdCanvasPutImageRect</b> + and <i><strong>image</strong></i><b>:cdCanvasGetImage</b>, and added canvas as the first parameter. Now <i>imlua_cd</i> + depends on <i>cdlua</i> from CD version 5.0.</li> + <li><span style="color: #008000">Changed:</span> metatable names in Lua are + now the same as the C struct names.</li> + <li><span style="color: #008000">Changed:</span> new read EXIF tags support + in TIFF format (no write support yet). Renamed attributes "GeoTransMatrix" + and "IntergraphMatrix", to "GeoTransformationMatrix" and "Intergraph + TransformationMatrix" for libGeoTIFF compatibility. Better support for + known TIFF tags. New support for reading one band of a multiband gray image + in TIFF format. New support for DNG files.</li> + <li><span style="color: #FF0000">Fixed:</span><strong> imConvertDataType</strong> + gamma function when converting real to/from integer.</li> + <li><span style="color: #FF0000">Fixed:</span><strong> </strong>small error at + the image border when resampling, rotating or other geometric operations.</li> + <li><span style="color: #FF0000">Fixed:</span><strong> </strong> + <b>imProcessCanny</b> invalid division by zero when input image is all zero.</li> + <li><span style="color: #FF0000">Fixed:</span><strong> </strong> + <b>imFileReadImageInfo</b> when loading MAP images with a scrambled gray + palette. They were incorrectly converted to GREY.</li> + <li><span style="color: #FF0000">Fixed:</span><strong> </strong> + support for IM_ALPHA and 32 bpp in ICO format.</li> + <li><span style="color: #FF0000">Fixed:</span><strong> </strong> + number of lines returned in <b>imProcessHoughLinesDraw</b>.</li> +</ul> +<h3 dir="ltr">Version 3.2 (24/Nov/2006)</h3> +<ul> + <li><span style="color: #0000FF">New:</span> <strong>imProcessRotateRef</strong> to rotate relative to a reference point.</li> + <li><span style="color: #0000FF">New:</span> geometric distortion <strong>imProcessSwirl</strong>.</li> + <li><span style="color: #0000FF">New:</span> <strong>imProcessInterlaceSplit</strong>.</li> + <li><span style="color: #0000FF">New:</span> function <strong>imGaussianKernelSize2StdDev</strong>.</li> + <li><span style="color: #0000FF">New:</span> convolutions <strong>imProcessBarlettConvolve</strong>, + <strong>imProcessPrewittConvolve</strong>, <strong>imProcessSplineEdgeConvolve</strong>, + <strong>imProcessConvolveDual</strong> and <strong>imProcessConvolveSep</strong>. </li> + <li><span style="color: #0000FF">New:</span> "im_kernel.h" module with simple functions to create know pre-defined kernels like sobel, laplacian, gaussian, + etc.</li> + <li><span style="color: #0000FF">New:</span> <strong>imVideoCaptureSetInOut</strong> to control input and output in capture devices.</li> + <li><span style="color: #0000FF">New:</span> function <strong>imBinMemoryRelease</strong> to release internal memory allocated + by the BinMemory file when saving.</li> + <li><span style="color: #0000FF">New:</span> functions for capture device information: + <strong>imVideoCaptureDeviceExDesc</strong>, <strong>imVideoCaptureDevicePath</strong> and + <strong>imVideoCaptureDeviceVendorInfo</strong>.</li> + <li><span style="color: #0000FF">New:</span> function <strong>imFileOpenAs</strong> + to open a file of a specific format.</li> + <li><span style="color: #0000FF">New:</span> functions <strong> + imFormatRegisterInternal</strong> and <strong>imFormatRemoveAll</strong> to + control format registration.</li> + <li><span style="color: #008000">Changed:</span> <strong>imProcessGaussianConvolve</strong> to used separable convolution and now is stddev is negative will use its + magnitude as the kernel size. Removed Rep functions <strong>imProcessGaussianConvolveRep</strong>, + <strong>imProcessDiffOfGaussianConvolveRep</strong> and + <strong>imGaussianStdDev2Repetitions</strong>.</li> + <li><span style="color: #008000">Changed:</span> <strong>imProcessBlend</strong> + to use an image instead of a constant. Old function renamed to <strong> + imProcessBlendConst</strong>.</li> + <li><span style="color: #008000">Changed:</span> <strong>imFileHandle</strong> prototype. Now the function has an index parameter to specify which handle it should return. + index=0 is always an imBinFile* handle. Use index=1 or greater to return other internal handles that are format + dependent.</li> + <li><span style="color: #008000">Changed:</span> the Removed the include "im.h" + to not include "im_lib.h". "im_lib.h" must be included when necessary.</li> + <li><span style="color: #008000">Changed:</span> <strong>imAnalyzeMeasureArea</strong> and + <strong>imAnalyzeMeasurePerimeter</strong> prototypes to include the number of regions as a + parameter. Fixed: these functions to internally initialize the results array to zero (this was necessary and not + documented).</li> + <li><span style="color: #008000">Changed:</span> <strong>imProcessFlip</strong> + and <strong>imProcessMirror</strong> so they can be done in-place.</li> + <li><span style="color: #FF0000">Fixed:</span> missing implementation of + <strong>imVideoCaptureOneFrame</strong> in Lua 5.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imAnalyzeFindRegions</strong> when pixel is at the width-1 column.</li> + <li><span style="color: #FF0000">Fixed:</span> file format identification when + <strong>TIFF</strong> identification failed was not closing the file.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imAnalyzeMeasurePerimeter</strong> when perimeter line is at the first or last lines. Thanks to Takeshi Mitsunaga.</li> + <li><span style="color: #FF0000">Fixed:</span> invalid return value in <strong>imVideoCaptureConnect</strong> in Lua 5.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imProcessRotate</strong> for IM_MAP images.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>Lua</strong> binding of + <strong>imFileImageSave</strong>, wrong parameters order. New: image:Save(filename, format) alias for imImage + objects.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>BMP</strong> format implementation when reading and writing RGBA 32 bits images.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imFileLoadImageFrame</strong> and + <strong>imFileLoadBitmapFrame</strong> index parameter in Lua.</li> + <li><span style="color: #FF0000">Fixed:</span> alpha channel allocation in imImage.</li> +</ul> +<h3>Version 3.1 (12/Dez/2005)</h3> +<ul> + <li><span style="color: #0000FF">New:</span> Download, Discussion List, Submission of Bugs, Support Requests and Feature Requests, are now available thanks + to the LuaForge site.</li> + <li><span style="color: #0000FF">New:</span> Binding for Lua 5</li> + <li><span style="color: #0000FF">New:</span> support for alpha in imImage.</li> + <li><span style="color: #0000FF">New:</span> organization of the documentation.</li> + <li><span style="color: #0000FF">New:</span> in ICON format the TransparencyIndex is used to for IM_MAP images without an alpha + channel.</li> + <li><span style="color: #0000FF">New:</span> video capture functions: <strong>imVideoCaptureFormatCount</strong>, + <strong>imVideoCaptureGetFormat</strong> + and <strong>imVideoCaptureSetFormat</strong>, to access the available capture video formats.</li> + <li><span style="color: #0000FF">New:</span> functions <strong>imFileLoadImageFrame</strong> and + <strong>imFileLoadBitmapFrame</strong> to reuse the + image data when loading.</li> + <li><span style="color: #0000FF">New:</span> function <strong>imFileImageSave</strong>.</li> + <li><span style="color: #0000FF">New:</span> function <strong>imImageCreateBased</strong>.</li> + <li><span style="color: #0000FF">New:</span> <strong>imProcessInsert</strong>.</li> + <li><span style="color: #0000FF">New:</span> compression functions <strong>imCompressDataLZF</strong> and + <strong>imCompressDataUnLZF</strong>, using + libLZF.</li> + <li><span style="color: #0000FF">New:</span> module for imBinFile, <strong>IM_FILEHANDLE</strong> that allows to access an already opened file using the + system file handle as file name. Thanks to Frederico Abraham.</li> + <li><span style="color: #008000">Changed:</span> in JPEG file format YcbCr are now automatically converted to RGB when loaded. RGB images were already + automatically converted to YCbCr when saved. Now this behavior can be controlled by the AutoYCbCr + attribute.</li> + <li><span style="color: #008000">Changed:</span> the <strong>imAnalyzeFindRegions</strong> to include an additional parameter that control if regions + touching the border are computed or not. The function <strong>imProcessPrune</strong> now will only eliminate the + regions in the selected size range.</li> + <li><span style="color: #008000">Changed:</span> third party libraries, updated to newest versions: libExif, libTIFF, libPNG and zlib. Added OLD JPEG + support in libTIFF.</li> + <li> + <span style="color: #008000">Changed:</span> optimization flags to ON when building the library in all platforms.</li> + <li><span style="color: #008000">Changed:</span> <strong>imProcessPerimeterLine</strong>, + <strong>imAnalyzeMeasurePerimeter</strong>, + <strong>imAnalyzeMeasurePerimArea</strong>, <strong>imAnalyzeMeasureCentroid</strong> and + <strong>imAnalyzeMeasurePrincipalAxis</strong> to consider pixels that touch the borders.</li> + <li><span style="color: #008000">Changed:</span> macro name <strong>cdPutBitmap</strong> to + <strong>imPutBitmap</strong>.</li> + <li><span style="color: #008000">Changed:</span> function names imImageLoad and + <strong>imImageLoadBitmap</strong>, to + <strong>imFileImageLoad</strong> and <strong>imFileImageLoadBitmap</strong>.</li> + <li><span style="color: #FF0000">Fixed:</span> overflow in <strong>imCalcImageStatistics</strong> fo IM_INT and IM_USHORT images.</li> + <li><span style="color: #FF0000">Fixed:</span> error management in system file I/O in + <strong>UNIX</strong>.</li> + <li><span style="color: #FF0000">Fixed:</span> some small defines for 64-bits compatibility in libExif, libPNG and libJPEG.</li> + <li><span style="color: #FF0000">Fixed:</span> incorrect interpretation of 16 bit data from + <strong>PNG</strong> files.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imFileReadImageInfo</strong> can be called many times with the same index that will return the + correct result without accessing the file again.</li> + <li><span style="color: #FF0000">Fixed:</span> small bug in sample <strong>iupglcap</strong>.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>TIFF</strong> format read for images with multiple bands in ExtraSamples.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>ICON</strong> format can_sequence was 0.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imProcessMergeHSI</strong> and + <strong>imProcessSplitHSI</strong> documentation, and + implementation for <strong>IM_BYTE</strong> images.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imProcessRangeContrastThreshold</strong>, + <strong>imProcessLocalMaxThreshold</strong> and + <strong>imProcessRankClosestConvolve</strong> when processing near the border.</li> + <li><span style="color: #FF0000">Fixed:</span> invalid file permissions in UNIX when saving a new file.</li> + <li><span style="color: #FF0000">Fixed:</span> name for <strong>imProcessLocalMaxThresEstimate</strong>.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imProcessReduceBy4</strong> for images with odd width and/or height.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imAttribTableSet</strong> when replacing an attribute (thanks to Takeshi Mitsunaga).</li> + <li><span style="color: #FF0000">Fixed:</span> memory leaks in <strong>imConvertToBitmap</strong> and + <strong>imConvertDataType</strong> (thanks to + Takeshi Mitsunaga).</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imProcessZeroCrossing</strong> for the last pixel column (thanks to Takeshi Mitsunaga). Also + fixed for some crossings that were lost.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imProcessGrayMorphConvolve</strong> for + <strong>IM_FLOAT</strong> images with + <strong>IM_FLOAT</strong> kernel (thanks to Takeshi Mitsunaga).</li> +</ul> +<h3>Version 3.0.3 (14/Oct/2004)</h3> +<ul> + <li><span style="color: #0000FF">New:</span> Image Transform <strong>imProcessDistanceTransform</strong>.</li> + <li><span style="color: #0000FF">New:</span> group of functions Image Analysis: + <strong>imAnalyzeFindRegions</strong>, <strong>imAnalyzeMeasureArea</strong>, + <strong>imAnalyzeMeasurePerimArea</strong>, <strong>imAnalyzeMeasureCentroid</strong>, + <strong>imAnalyzeMeasurePrincipalAxis</strong>, <strong>imAnalyzeMeasureHoles</strong>, imProcessPerimeterLine, + <strong>imAnalyzeMeasurePerimeter</strong>, <strong>imProcessPrune</strong>, + <strong>imProcessFillHoles</strong>.</li> + <li><span style="color: #0000FF">New:</span> <strong>imConvertMapToRGB</strong> to help loading data as RGB.</li> + <li><span style="color: #0000FF">New:</span> sample iupglcap.</li> + <li><span style="color: #0000FF">New:</span> <strong>imProcessRenderChessboard</strong> and + <strong>imProcessRenderGrid</strong>.</li> + <li><span style="color: #008000">Changed:</span> <strong>imProcessThreshold</strong>, + <strong>imProcessRangeContrastThreshold</strong> and <strong>imProcessLocalMaxThreshold</strong> now also supports + <strong>IM_USHORT</strong> and <strong>IM_INT</strong> + data types. </li> + <li><span style="color: #008000">Changed:</span> the default color conversion to binary + so it can be done for all color spaces.</li> + <li><span style="color: #008000">Changed:</span> im_process.h to split into 4 files: im_process_pont.h, + im_process_loc.h, im_process_glo.h, im_process_ana.h. But it still + exists and includes the new files for compatibility.</li> + <li><span style="color: #008000">Changed:</span> the border extensions in several types of convolution. Rank convolution do not extend the borders. Binary + morphology use zero extension. Gray morphology do not extend the borders.</li> + <li><span style="color: #FF0000">Fixed:</span> file read with bitmap conversion when original data changes only data type. </li> + <li><span style="color: #FF0000">Fixed:</span> rank convolution operations that did not accept even kernel sizes.</li> + <li><span style="color: #FF0000">Fixed:</span> <strong>imProcessHoughLinesDraw</strong> that was ignoring some lines.</li> +</ul> +<h3>Version 3.0.2 (25/Aug/2004)</h3> + + <p>- <span style="color: #0000FF">New:</span> utility functions <b><b>imPaletteHighContrast</b></b>, <b> + <b>imImageLoadImage</b></b> and <b> + <b>imImageLoadBitmap</b></b>. <br> + - <span style="color: #0000FF">New:</span> operation <b><b>imProcessNormalizeComponents</b></b>.<br> + - <span style="color: #008000">Changed:</span> name <b><b>imProcessGaussianConvolve</b></b> to <b> + <b>imProcessGaussianConvolveRep</b></b>. New: + operation <b><b>imProcessGaussianConvolve</b></b> that uses a float kernel. + New: utility functions <b> + <b>imGaussianStdDev2Repetitions</b></b> and <b><b>imGaussianStdDev2KernelSize</b></b>.<br> + - <span style="color: #008000">Changed:</span> name <b><b>imProcessDiffOfGaussianConvolve</b></b> to <b> + <b>imProcessDiffOfGaussianConvolveRep</b></b>. + New: operation <b><b>imProcessDiffOfGaussianConvolve</b></b> that uses a float kernel. <br> + - <span style="color: #008000">Changed:</span> <b>IM_GAMUT_BRIGHTCONT</b> + parameters to the interval [-100,100]. Fixed: <b> + <b>IM_GAMUT_EXPAND</b></b> and <b><b>IM_GAMUT_BRIGHTCONT</b></b> normalization.<br> + - <span style="color: #008000">Changed:</span> logical operations, flag <b> <b>IM_BIT_NOT </b> + </b>replaced by operation <b><b>imProcessBitwiseNot</b></b>.<br> + - <span style="color: #008000">Changed:</span> <b>imImageSetAttribute</b> count can be -1 for zero terminated data.<br> + - <span style="color: #FF0000">Fixed:</span> operations <b><b>imProcessBitwiseNot</b></b> and <b> + <b>imProcessNegative</b></b> for <b><b>IM_BINARY</b></b> images.<br> + - <span style="color: #FF0000">Fixed:</span> the <b><b>color_mode_flags</b></b> parameter interpretation by <b> + <b>imFileReadImageData</b></b>. + <br> + - <span style="color: #FF0000">Fixed:</span> <b>imProcessEqualizeHistogram</b> and <b> + <b>imProcessExpandHistogram</b></b> for + color images. <br> + - <span style="color: #FF0000">Fixed:</span> <b>imProcessMultipleStdDev</b>.<br> + - <span style="color: #FF0000">Fixed:</span> <b>imProcessDifusionErrThreshold</b> for <b> + <b>IM_GRAY</b></b> images.<br> + - <span style="color: #FF0000">Fixed:</span> "<b><b>KRN</b></b>" format, internal format is topdown.<br> + - <span style="color: #FF0000">Fixed:</span> initialization of TGA image_count.</p> + +<h3>Version 3.0.1 (22/Apr/2004)</h3> + + <p>- Improved compatibility with the old version, it was missing the load of Map images with <b> + <b>imLoadRGB</b></b>.<br> + - The FFTW code was from version 2.1.3, not from 2.1.5 as suposed, it was updated. The FFT functions were condensed in + only one file with an "#ifdef" for FFTW version 2 and 3. The FFT functions also were renamed to remove the "W" that + belongs only to the FFTW library.<br> + - The <b><b>SetAttribute</b></b> functions now accept NULL in data to remove the attribute.<br> + - New: <b><b>imProcessCrossCorrelation</b></b> and <b><b>imProcessAutoCorrelation</b></b> functions.<br> + - The <b><b>imCalcGrayHistogram</b></b> function now can calculate the histogram of <b> + <b>IM_MAP</b></b> + and <b><b>IM_BINARY</b></b> images.</p> + +<h3>Version 3.0 (April 2004)</h3> + + <p>A major rewrite of the library. Everything changed, check the manual, but backward compatibility is kept for old + applications. A new API more flexible, new formats, support for attributes and video, image capture and image + processing. New: color spaces and data types. The library now got a professional look for scientific applications.</p> + +<h3>Version 2.6 (May 2002)</h3> + + <p>Correction of bug in resolution reading and writing for format JPEG.</p> + +<h3>Version 2.5 (August 2001)</h3> + + <p>Correction of bug in the default GIF compression. Two new callbacks: transparency color index for GIF files and + image description for TIFF files.</p> + +<h3>Version 2.4 (February 2000)</h3> + + <p>Change in the treatment of LZW compression in formats TIFF and GIF. Now compression is no longer the default.</p> + +<h3>Version 2.3 (June 1998)</h3> + + <p>Close function of the access driver for files in memory corrected. JPEG library updated to 6b. Correction of a + problem with the reading of some JPEG files.</p> + +<h3>Version 2.2 (November 1997)</h3> + + <p>The definition of the counter callback was changed to inform, in a parameter, the type of access being performed, + either reading or writing. Type <strong>imCallback</strong> defined to make type casting easier when using function + <strong>imRegisterCallback</strong>. Correction of a problem with the makefile in UNIX, which was generating link + errors in some platforms.</p> + +<h3>Version 2.1 (October 1997)</h3> + + <p>Correction of a problem with internal memory liberation when reading Map images in TIFF files. Conversion <b>RGB to + Map</b> is now made using the algorithm implemented by LibJPEG. The algorithm of <strong>imResize</strong> was + improved for cases in which the size is being reduced instead of increased. Correction of a problem with functions + <strong>imImageInfo</strong> and <strong>imFileFormat</strong>: when the provided file was not in a format recognized + by IM, there was an error in format TGA which caused these functions to access an invalid memory area.</p> + +<h3>Version 2.0 (September 1997)</h3> + + <p>The library was virtually rewritten to implement a new structure which allowed greater flexibility, simplifying the + addition of new formats. Formats <strong>TGA</strong>, <strong>PCL</strong>, <strong>JPEG</strong> and <strong>LED</strong> + were added to the list of supported formats, and new functions were added: <strong>imMap2RGB</strong>, <strong> + imRGB2Gray</strong>, <strong>imMap2Gray</strong>, <strong>imResize</strong>, <strong>imStretch</strong>.</p> + +<h3>Version 1.1 (June 1996)</h3> + + <p>Small corrections to increase portability. Changes in return codes. Identifiers were created to return codes and + predefined parameters. Online manual concluded.</p> + +<h3>Version 1.0 (October 1995)</h3> + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/home.html b/html/en/home.html new file mode 100644 index 0000000..bd5efe4 --- /dev/null +++ b/html/en/home.html @@ -0,0 +1,28 @@ +<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<title>Home</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body bgcolor="#FFFFFF"> +<div class="homeTitle">IM</div> +<div class="homeDescription">Image Representation, Storage, Capture and Processing</div> +<div class="homeVersion">Version 3.4</div> +<hr> + <p><strong>IM</strong> is a toolkit for Digital Imaging. IM is based on 4 concepts: Image Representation, Storage, Processing + and Capture. The main goal of the library is to provide a simple API and abstraction of images for scientific + applications.</p> + <p>The most popular file formats are supported: TIFF, BMP, PNG, JPEG, GIF and AVI. Image representation includes + scientific data types. About a hundred Image Processing operations are available.</p> + <p>This work was developed at Tecgraf/PUC-Rio by means of the partnership with PETROBRAS/CENPES.</p> + <h2>Project Management:</h2> + <p class="info">Antonio Escaño Scuri</p> +<p style="margin-left:0">Tecgraf - Computer Graphics Technology Group, PUC-Rio, Brazil <br> +<a href="http://www.tecgraf.puc-rio.br/im">http://www.tecgraf.puc-rio.br/im</a> </p> + +</body> + +</html> diff --git a/html/en/imaging.gif b/html/en/imaging.gif Binary files differnew file mode 100644 index 0000000..4878803 --- /dev/null +++ b/html/en/imaging.gif diff --git a/html/en/imlua.html b/html/en/imlua.html new file mode 100644 index 0000000..63ebd05 --- /dev/null +++ b/html/en/imlua.html @@ -0,0 +1,124 @@ +<html> + +<head> +<meta name="GENERATOR" content="Microsoft FrontPage 12.0"> +<meta name="ProgId" content="FrontPage.Editor.Document"> +<meta http-equiv="Content-Language" content="en-us"> +<title>Lua Binding</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Lua Binding Guide</h1> +<h3><a name="Overview">Overview</a></h3> + + <p><strong>I</strong><span lang="en-us"><strong>m</strong></span><strong>Lua</strong> was developed to make all functionalities of the + <strong>IM</strong> library available to Lua programmers. To use the <strong>I</strong><span lang="en-us"><strong>m</strong></span><strong>Lua</strong> + bindings, your executable must be linked with the "imlua" library, and you must call the initialization function + <strong><font face="Courier New">imlua_open</font></strong> declared in the header file <strong> + <font face="Courier New">imlua</font><font size="2" face="Courier New">.</font><font face="Courier New">h</font></strong>, + as seen in the example below:</p> + + <div align="center"> + <center> + <table cellpadding="10" cellspacing="0" style="border-width: 0; border-collapse: collapse" bordercolor="#111111" id="AutoNumber1"> + <tr> + <th> + <p align="center">in Lua<span lang="en-us"> </span>5</th> + </tr> + <tr> + <td> + <pre>#include <lua.h> +#include <lualib.h> +#include <lauxlib.h> +<b><font color="#FF0000">#include <imlua.h></font></b></pre> + <pre>void main(void) +{ + lua_State *L = lua_open(); + + luaopen_string(L); + luaopen_math(L); + luaopen_io(L); + +<b> <font color="#FF0000">imlua_open(L);</font> +</b> + lua_dofile("myprog.lua"); + + lua_close(L); +}</pre> + </td> + </tr> + </table> + </center> + </div> + + <p>The <strong>imlua_open</strong> function registers all <strong>IM</strong> functions and constants + your Lua program will need. The use of the <strong>I</strong><span lang="en-us"><strong>m</strong></span><strong>Lua</strong> functions in Lua is generally identical to their equivalents in C. + Nevertheless, there are several exceptions due to differences between the two languages. Notice that, as opposed to C, + in which the flags are<i> </i>combined with the bitwise operator OR, in Lua the flags are added arithmetically. </p> + <p>The other secondary libraries also have their initialization functions declared in + <strong>imlua.h</strong> + and each one have a separate library to be linked with the application. See <a href="doxygen/group__imlua.html">IM Lua + 5 Binding</a> reference.</p> + <p>The I<span lang="en-us">m</span>Lua dynamic libraries are also compatible with the Lua 5 "loadlib" function.<span lang="en-us"> + </span>Here is an example on how to dynamically load I<span lang="en-us">M</span> + in Lua 5<span lang="en-us">.1</span>:</p> +<pre>local i<span lang="en-us">m</span>lua_open = package.loadlib("i<span lang="en-us">m</span>lua51.dll", "i<span lang="en-us">m</span>lua_open") +i<span lang="en-us">m</span>lua_open()</pre> +<p><strong>Lua</strong> 5.1 "require" can be used for all the <strong> +ImLua</strong> +libraries. You can use <b>require</b>"<strong>im</strong><b>lua</b>" and so on, but the LUA_CPATH +must also contains the following: </p> + +<pre>"./lib?51.so;" [in UNIX] + +".\\?51.dll;" [in Windows]</pre> +<p>The LuaBinaries distribution already includes these modifications on the +default search path.</p> +<p>The simplest form <b>require</b>"<b>i<span lang="en-us">m</span></b>" +and so on, can not be used because there are IM dynamic libraries with names +that will conflict with the names used by <b>require</b> during search.</p> +<h3><a name="New Functions">Function Names and Definitions</a></h3> + + <p>In Lua, because of the name space "im" all the functions and definitions have their names prefix changed. The + general rule is quite simple:</p> + + <pre>imXxx -> im.Xxx +IM_XXX -> im.XXX +imFileXXX(ifile,... -> ifile:XXX(... +imImageXXX(image,... -> image:XXX(...</pre> + + +<h3>Modifications to the API</h3> + + <p>New functions (without equivalents in C) were implemented to create and + destroy objects that do not exist in C. For instance functions were developed + to create and destroy images, files, viceo capture and palette. All the + metatables have the "tostring" method implemented to help debuging.</p> + + <p>Some functions were modified to receive those objects as parameters.</p> + <p>Also the functions which receive values by reference in C were modified. Generally, the values of + parameters that would have their values modified are now returned by the function in the same order.</p> +<p>In C there is no parameter checking in the processing functions, but in Lua +all parameters are checked and a Lua error is emitted when check fails.</p> + + +<h3>Garbage Collection</h3> + + <p>All the objects are garbage collected by the Lua garbage collector.</p> + +<h3><a name="Integration with IMLua">Integration with CDLua</a></h3> + + <p>In <b>CDLua</b> there is an additional library providing simple functions to map the + <strong>imImage</strong> + structure to the <strong>cdBitmap</strong> structure. And some facilities to + draw an image in a CD canvas. See also the <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd">CD documentation</a> and + the <a href="doxygen/group__imlua.html">IM Lua 5 Binding</a> reference.</p> + <p>Color values and palettes can be created and used transparently in both libraries. Palettes and color values are + 100% compatible between CD and IM.</p> + + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/libjasper.txt b/html/en/libjasper.txt new file mode 100644 index 0000000..f817ef4 --- /dev/null +++ b/html/en/libjasper.txt @@ -0,0 +1,51 @@ +JasPer License Version 2.0 + +Copyright (c) 2001-2006 Michael David Adams +Copyright (c) 1999-2000 Image Power, Inc. +Copyright (c) 1999-2000 The University of British Columbia + +All rights reserved. + +Permission is hereby granted, free of charge, to any person (the +"User") obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +1. The above copyright notices and this permission notice (which +includes the disclaimer below) shall be included in all copies or +substantial portions of the Software. + +2. The name of a copyright holder shall not be used to endorse or +promote products derived from the Software without specific prior +written permission. + +THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS +LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER +THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS +"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL +INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING +FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE +PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE +THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. +EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS +BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL +PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS +GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE +ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE +IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL +SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, +AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL +SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH +THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, +PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH +RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY +EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. + diff --git a/html/en/libjpeg.txt b/html/en/libjpeg.txt new file mode 100644 index 0000000..3937918 --- /dev/null +++ b/html/en/libjpeg.txt @@ -0,0 +1,48 @@ +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. diff --git a/html/en/liblzf.txt b/html/en/liblzf.txt new file mode 100644 index 0000000..00ec071 --- /dev/null +++ b/html/en/liblzf.txt @@ -0,0 +1,30 @@ +Copyright (c) 2000-2005 Marc Alexander Lehmann <schmorp@schmorp.de> + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- +CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- +CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- +ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +Alternatively, the following files carry an additional notice that +explicitly allows relicensing under the GPLv2: lzf.c lzf.h lzfP.h lzf_c.c +lzf_d.c + diff --git a/html/en/libpng.txt b/html/en/libpng.txt new file mode 100644 index 0000000..2640ec9 --- /dev/null +++ b/html/en/libpng.txt @@ -0,0 +1,109 @@ + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +libpng versions 1.2.6, August 15, 2004, through 1.2.22, October 13, 2007, are +Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +October 13, 2007 diff --git a/html/en/libtiff.txt b/html/en/libtiff.txt new file mode 100644 index 0000000..8282186 --- /dev/null +++ b/html/en/libtiff.txt @@ -0,0 +1,21 @@ +Copyright (c) 1988-1997 Sam Leffler +Copyright (c) 1991-1997 Silicon Graphics, Inc. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, provided +that (i) the above copyright notices and this permission notice appear in +all copies of the software and related documentation, and (ii) the names of +Sam Leffler and Silicon Graphics may not be used in any advertising or +publicity relating to the software without the specific, prior written +permission of Sam Leffler and Silicon Graphics. + +THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. diff --git a/html/en/paking.gif b/html/en/paking.gif Binary files differnew file mode 100644 index 0000000..a3893b0 --- /dev/null +++ b/html/en/paking.gif diff --git a/html/en/proc_guide.html b/html/en/proc_guide.html new file mode 100644 index 0000000..5226702 --- /dev/null +++ b/html/en/proc_guide.html @@ -0,0 +1,144 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Processing Guide</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Image Processing Guide</h1> +<h3 align="left"><a name="Using">Using</a></h3> + + <p>You should include one or more headers: <im_process_ana.h>, + <im_process_glo.h>, <im_process_loc.h> and <im_process_pon.h>. And you must + link with the "im_process.a/im_process.lib" library. </p> + <p>The processing operations are very simple to use. Usually you just have to + call the respective function. But you will have to ensure yourself that the + image parameters for the input and output data are correct. Here is an + example:</p> + + <pre>void imProcessFlip(const imImage* src_image, imImage* dst_image);</pre> + + <p>The processing operations are exclusive for the <b>imImage</b> structure. + This makes the implementation cleaner and much easier to process color images + since the planes are separated. But remmber that you can always use the + <strong>imImageInit</strong> function to initializes an <b>imImage</b> structure with + your own buffer.</p> +<p>The image data of the output image is assumed to be zero before any +operation. This is always true after creating a new image, but if you are +reusing an image for several operation use <strong>imImageClear</strong> to zero +the image data between operations. </p> + +<h3><a name="new">New Operations</a></h3> + + <p>An operation complexity is directly affected by the number of data types it + will operate.</p> + <p>If it is only one, than it is as simple as:</p> + + <pre>void DoProc(imbyte* data, int width, int height) +{ + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + // Do something + int offset = y * width + x; + + data[offset] = 0; + } + } +} + +void SampleProc(imImage* image) +{ + // a loop for all the color planes + for (int d = 0; d < image->depth; d++) + { + // Notice that the same operation may be used to process each color component + DoProc((imbyte*)image->data[d], image->width, image->height); + } +}</pre> + + <p>Or if you want to use templates to allow a more number of types:</p> + + <pre>template <class T> +void DoProc2(const T* src_data, T* dst_data, int count) +{ + for (int i = 0; i < count; i++) + { + src_data[i] = dst_data[i]; + + // or a more low level approach + + *src_data++ = *dst_data++; + } +} + +// This is a sample that do not depends on the spatial distribution of the data. +// It uses data[0], the pointer where all depths depends on. + +void SampleProc2(const imImage* src_image, imImage* dst_image) +{ + int total_count = src_image->count * src_image->depth; + switch(src_image->data_type) + { + case IM_BYTE: + DoProc((imbyte*)src_image->data[0], (imbyte*)dst_image->data[0], total_count); + break; + case IM_USHORT: + DoProc((imushort*)src_image->data[0], (imushort*)dst_image->data[0], total_count); + break; + case IM_INT: + DoProc((int*)src_image->data[0], (int*)dst_image->data[0], total_count); + break; + case IM_FLOAT: + DoProc((float*)src_image->data[0], (float*)dst_image->data[0], total_count); + break; + case IM_CFLOAT: + DoProc((imcfloat*)src_image->data[0], (imcfloat*)dst_image->data[0], total_count); + break; + } +}</pre> + + <p>The first sample can be implemented in C, but the second sample can not, it + must be in C++. Check the manual and the source code for many operations + already available.</p> + +<h3><a name="count">Counters</a></h3> + + <p>To add support for the counter callback to a new operation is very simple. + The following code shows how:</p> + + <pre>int counter = imCounterBegin("Process Test 1"); +imCounterTotal(counter, count_steps, "Processing"); + +for (int i = 0; i < count_steps; i++) +{ + // Do something + + + if (!imCounterInc(counter)) + return IM_ERR_COUNTER; +} + +imCounterEnd(counter);</pre> + + <p>Every time you call <b>imCounterTotal</b> between a <b>imCounterBegin</b>/<b>imCounterEnd</b> for the same counter means + that you are starting a count at that counter. So one operation can be + composed by many sub-operations and still have a counter to display progress. + For example, each call to the <b>imFileReadImageData</b> starts a new + count for the same counter.</p> + <p>A nice thing to do when counting is not to display too small progress. To + accomplish that in the implementation of the counter callback consider a + minimum delay from one display to another.</p> + <p>See <a href="doxygen/group__counter.html"> + Utilities / Counter</a>.</p> + + +</body> + +</html> diff --git a/html/en/proc_samples.html b/html/en/proc_samples.html new file mode 100644 index 0000000..e51ff37 --- /dev/null +++ b/html/en/proc_samples.html @@ -0,0 +1,142 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<title>Processing Samples</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Image Processing Samples</h1> +<h3><a name="proc_fourier">Fourier Transform</a></h3> + + <p>This is another command line application that process an image in the + Fourier Frequency Domain. In this domain the image is a map of the spatial + frequencies of the original image. It depends on the IM main library and on + the IM_FFTW library. The FFTW is a very fast Fourier transform, but is + contaminated by the GPL license, so everything must be also GPL. To use it in + a commercial application you must contact the MIT and pay for a commercial + license.</p> + <p>Se also + <a href="doxygen/group__transform.html"> + Reference / Image Processing / Domain Transform Operations</a>.</p> + <p>You can view the source code here: <a href="../download/proc_fourier.cpp"> + proc_fourier.cpp</a></p> + +<h3><a name="houghlines">Hough Lines</a></h3> + + <p>The Hough transform can be used to detect lines in an image. But it results + are highly dependent on other operations done before and after the transform. + Here you can see a small pseudo code that ilustrates a possible sequence of + operations to detect lines using the hough transform.</p> + <p>First the canny operator will isolate the borders, the threshold will mark + the candidate pixels. After the transform the local maximum are isolated to + detect the line parameters of the lines that have many pixels from the + cadidate ones. The last operation will just draw the detected lines over the + original gray scale image.</p> + + <pre>imProcessCanny(in,out,stddev) +imProcessHysteresisThreshold(in,out,low,high) + +imProcessHoughLines(in,out) +imProcessLocalMaxThreshold(in,out,size,min) + +imProcessHoughLinesDraw(in1,in2,out)</pre> + + <p>Or a more complete sequence using another approach:</p> + + <pre>gray = imImageCreate(width, height, IM_GRAY, IM_BYTE); +binary = imImageCreate(width, height, IM_BINARY, IM_BYTE); +binary2 = imImageClone(binary); + +rhomax = sqrt(width*width +height*height)/2; +hough_height=2*rhomax+1; +hough = imImageCreate(180, hough_height, IM_GRAY, IM_INT); +hough_binary = imImageCreate(180, hough_height, IM_BINARY, IM_BYTE); + +imConvertColorSpace(rgb, gray); + +// very important step, the quality of the detected lines are highly dependent on +// the quality of the binary image +// Using a simple threshold like in here maybe not a good solution for your image +imProcessPercentThreshold(gray, binary, percent=50); + +// eliminates unwanted objects, depending on the quality of the threshold +// this step can be skiped +imProcessBinMorphClose(binary, binary2, 3, 1); +imProcessPrune(binary2, binary, 4, size=100, 0); + +// Is there any holes in the objects? +// Holes also have borders... +imProcessFillHoles(binary, binary2, 4); + +// leave only the object borders +imProcessPerimeterLine(binary2, binary); + +// here you should have near only the lines you want to detect. +// if there are more or less lines that you want redo the previous steps + +imProcessHoughLines(binary, hough); +imProcessLocalMaxThreshold(hough, hough_binary, 7, 100); + +// this is optional, it will draw the results +imProcessHoughLinesDraw(gray,hough_binary,draw_hough); </pre> + + <p>In the result of <b>imProcessLocalMaxThreshold</b> there will be several white + pixels. They represent the detected lines. Defining:</p> + + <pre>Y = a * X + b +cos(theta) * X + sin(theta) * Y = rho + +where: + X = x - width/2 + Y = y - height/2 + +because the origin of the transform is in the center of the image</pre> + + <p>Each coordinate in the transform has values in the intervals:</p> + + <pre>theta = 0 .. 179 (horizontal coordinate of the hough space) +rho = -rhomax .. rhomax (vertical coordinate of the hough space, + vertically centered in the image) + +where: + rhomax = sqrt(width*width + height*height) /2 (width and height of the original image)</pre> + + <p>For each (xi, yi) point found in the result image:</p> + + <pre>theta = xi; +rho = yi - rhomax; + +then: + +a = -cos(theta)/sin(theta); +b = (rho + (width/2)*cos(theta) + (height/2)*sin(theta))/sin(theta);</pre> + + <p>The complex formula for "b" came from the fact that we have to shift the + result to the image origin at (0,0).</p> + +<h3><a name="analysis">Image Analysis</a></h3> + + <p>The following pseudo code ilustrates the sequence of operations to measure + regions. This is also called Blob Analysis.</p> + <p>First the regions are isolated from background using a threshold. Then + regions too small or too large are eliminated and the holes are filled in this + example. After the regions are found we can start measuring properties of the + regions like area and perimeter.</p> + + <pre>imProcessSliceThreshold(in, out, level1, level2) +imProcessPrune(in, out, connect, size1, size2) +imProcessFillHoles(in, out, connect) +imAnalyzeFindRegions(in, out, connect) +imAnalyzeMeasureArea(in, area) +imAnalyzeMeasurePerimeter(in, perim)</pre> + + + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/processing.html b/html/en/processing.html new file mode 100644 index 0000000..cbfc7b5 --- /dev/null +++ b/html/en/processing.html @@ -0,0 +1,35 @@ +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>Processing</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Image Processing Overview</h1> + + <p>We use the simpliest model possible, a function with input data, output + data and control parameters. </p> + <p>The operations have usually one or more input images, and one or more + output images. We avoid implementing in-place operations, but many + operations can use the same data for input and output. The data type, color + mode and size of the images depends on the operation. Sometimes the operations + can change the data type to increase the precision of the results, but + normally only a few operations will change the size (resize and geometric) and + color mode (color conversion). All of these details are described in each + function documentation, check before using them.</p> + <p>There is no ROI (Region Of Interest) management, but you can <strong> + imProcessCrop</strong>, <strong>imProcess</strong>*, + then <strong>imProcessInsert</strong> the result in the original image.</p> +<p>The image data of the output image is assumed to be zero before any +operation. This is always true after creating a new image, but if you are +reusing an image for several operation use <strong>imImageClear</strong> to zero +the image data between operations.</p> + + +</body> + +</html> diff --git a/html/en/prod.html b/html/en/prod.html new file mode 100644 index 0000000..ee385dc --- /dev/null +++ b/html/en/prod.html @@ -0,0 +1,132 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<title>IM</title> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<base target="_blank"> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h3><a name="Overview">Overview</a></h3> + + <p>IM is a toolkit for Digital Imaging. IM is based on 4 concepts: Image Representation, Storage, Processing and + Capture. Image Visualization is a task that it is left for a graphics library.</p> + <p>It provides support for image capture, several image file formats and many image processing operations. The most + popular file formats are supported: TIFF, BMP, PNG, JPEG, GIF and AVI.</p> + <p>Image representation includes scientific data types (like IEEE floating point data) and attributes (or metadata + like GeoTIFF and Exif tags). Animation, video and volumes are supported as image sequences, but there is no digital + audio support. </p> + <p>The main goal of the library is to provide a simple API and abstraction of images for scientific applications. </p> + <p>The toolkit API is written in C. The core library source code is implemented in C++ and it is very portable, it can + be compiled in Windows and UNIX with no modifications. New image processing operations can be implemented in C or in + C++.</p> + <p>IM is free software, can be used for public and commercial applications.</p> + <p>IM has been used in Tecgraf for many theses and dissertations. Check the Publications in Tecgraf's web site + <a href="http://www.tecgraf.puc-rio.br/">http://www.tecgraf.puc-rio.br/</a>.</p> + +<h3><a name="available">Availability</a></h3> + + <p>The library is available for several <strong>compilers</strong>: </p> + <ul> + <li>GCC and CC, in the UNIX environment </li> + <li>Visual C++, Borland C++, Watcom C++ and GCC (Cygwin and MingW), in the Windows environment</li> + </ul> + <p>The library is available for several <strong>operating systems</strong>:</p> + <ul> + <li>UNIX (SunOS, IRIX, AIX, FreeBSD and Linux)</li> + <li>Microsoft Windows NT/2K/XP</li> + </ul> + +<h3><a name="support">Support</a></h3> + + <p>The official support mechanism is by e-mail, using <b><u> + <a href="mailto:im@tecgraf.puc-rio.br?subject=[IM]">im@tecgraf.puc-rio.br</a></u></b>. + Before sending your message:</p> + <ul> + <li>Check if the reported behavior is not described in the user guide. </li> + <li>Check if the reported behavior is not described in the specific format characteristics. </li> + <li>Check the History to see if your version is updated. </li> + <li>Check the To Do list to see if your problem has already been reported.</li> + </ul> + <p>After all of the above have been checked, report the problem, including in your message: <strong>function, element, + format, platform, and compiler.</strong></p> + <p>We host <b>IM</b> support features at <b><a href="http://luaforge.net/">LuaForge</a></b>. It provides us + Lists, News, CVS and Files. The <b>IM</b> page at <b>LuaForge</b> is available at: + <a target="_blank" href="http://luaforge.net/projects/imtoolkit/">http://luaforge.net/projects/imtoolkit/</a>.</p> + + <p>The discussion list is available at: + <a target="_self" href="http://lists.luaforge.net/mailman/listinfo/imtoolkit-users"> + http://lists.luaforge.net/mailman/listinfo/imtoolkit-users</a>.<br> + Source code, pre-compiled binaries and samples can be downloaded at: <a href="http://luaforge.net/frs/?group_id=86"> + http://luaforge.net/frs/?group_id=86</a>.<br> + The CVS can be browsed at: <a href="http://luaforge.net/scm/?group_id=86">http://luaforge.net/scm/?group_id=86</a>.</p> + + <p>If you want us to develop a specific feature for the toolkit, Tecgraf is available for partnerships and + cooperation. Please contact <u><b>tcg@tecgraf.puc-rio.br</b></u>.</p> + <p>Lua documentation and resources can be found at <a href="http://www.lua.org/">http://www.lua.org/</a>.</p> + +<h3><a name="thanks">Credits</a></h3> + + <p>This work was developed at Tecgraf by means of the partnership with PETROBRAS/CENPES.</p> +<p>Library Author:</p> +<ul> + <li>Antonio Scuri</li> +</ul> + <p>Thanks to the people that worked and contributed to the library:</p> + <ul> + <li>Antonio Nabuco Tartarini </li> + <li>Carolina Alfaro</li> + <li>Diego Fernandes Nehab </li> + <li>Erick de Moura Ferreira </li> + <li>Luiz Henrique Figueiredo </li> + <li>Marcelo Gattass</li> + </ul> + <p>We also thank the developers of the third party libraries:</p> + <ul> + <li>Sam Leffler (libTIFF author) </li> + <li>Frank Warmerdam, Andrey Kiselev, Mike Welles and Dwight Kelly (<a target="_blank" href="http://www.libtiff.org/">libTIFF</a> + actual maintainers) </li> + <li>Thomas Lane (<a target="_blank" href="http://www.ijg.org/">libJPEG</a>) </li> + <li>Lutz Müller (<a target="_blank" href="http://sourceforge.net/projects/libexif">libExif</a>) </li> + <li>Glenn Randers-Pehrson (<a target="_blank" href="http://www.libpng.org/">libPNG</a>) </li> + <li>Jean-loup Gailly and Mark Adler (<a target="_blank" href="http://www.gzip.org/zlib/">zlib</a>) </li> + <li>Gershon Elber (GIFLib) </li> + <li>Michael Adams (<a target="_blank" href="http://www.ece.uvic.ca/~mdadams/jasper/">libJasper</a>) </li> + <li>Svein Bøe, Tor Lønnestad and Otto Milvang (<a target="_blank" href="http://www.ifi.uio.no/forskning/grupper/dsb/Software/Xite/">XITE</a>)</li> + <li>Jason Perkins (<a href="http://premake.sourceforge.net/">Premake</a>)</li> + <li>Marc Alexander Lehmann (<a href="http://liblzf.plan9.de/">libLZF</a>)</li> + <li>(to many others that contribute to these library, keeping them free and updated)</li> + </ul> + <p>The IM toolkit distribution includes the some third party libraries that are not developed by Tecgraf. Their + license are also free and have the same freedom as the <a href="copyright.html">Tecgraf Library + License</a>. You can read the respective licenses in the files: <a href="zlib.txt">zlib.txt</a>, <a href="libpng.txt"> + libpng.txt</a>, <a href="libjpeg.txt">libjpeg.txt</a>, <a href="libtiff.txt">libtiff.txt</a>, <a href="libjasper.txt"> + libjasper.txt</a>, <a href="liblzf.txt">liblzf.txt</a>.</p> +<p>IM is registered at the National Institute of Intellectual Property in Brazil +(INPI) under the number 07570-6, and so it is protected against illegal use. See +the <a href="copyright.html">Tecgraf Library License</a> for further usage +information and Copyright.</p> + +<h3><a name="docs">Documentation</a></h3> + + <p>This toolkit is available at <a href="http://www.tecgraf.puc-rio.br/im">http://www.tecgraf.puc-rio.br/im</a>. </p> + <p>The full documentation can be downloaded from the <a target="_self" href="download.html">Download Files</a>. The documentation is also available in Adobe Acrobat and Windows HTML Help formats.</p> + <p>The HTML navigation uses the WebBook tool, available at + <a href="http://www.tecgraf.puc-rio.br/webbook" target="_blank">http://www.tecgraf.puc-rio.br/webbook</a>.</p> + <p>The library Reference documentation is generated by Doxygen ( <a href="http://www.stack.nl/~dimitri/doxygen/"> + http://www.stack.nl/~dimitri/doxygen/</a> ).</p> + +<h3>Publications</h3> +<ul> + <li>Scuri, A. "IM - Imaging Toolkit". Software Developer's Journal. Jan/2006. [<a href="http://en.sdjournal.org/products/articleInfo/25">http://en.sdjournal.org/products/articleInfo/25</a>]</li> + <li>Scuri, A., "IM – An Imaging Tool", Poster, SIBGRAPI 2004 [<a target="_self" href="../download/poster.pdf">poster.pdf</a>, + <a href="../download/poster_text.pdf">poster_text.pdf</a>]</li> +</ul> + +</body> + +</html> diff --git a/html/en/rep_guide.html b/html/en/rep_guide.html new file mode 100644 index 0000000..0dfd939 --- /dev/null +++ b/html/en/rep_guide.html @@ -0,0 +1,139 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Representation Guide</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Image Representation Guide</h1> +<h3 align="left"><a name="raw">Raw Data Buffer</a></h3> + + <p align="left">To create a raw image buffer you can simply use the utility function:</p> + + <div align="left"> + <pre>int width, height, color_mode, data_type; +int size = imImageDataSize(width, height, color_mode, data_type); +void* buffer = malloc(size);</pre> + </div> + + <div align="left"> + <p align="left">So if the data type is <strong>IM_FLOAT</strong>, we could write:</div> + <div align="left"> + + <pre>float* idata = (float*)buffer;</pre> + + </div> + <div align="left"> + <p align="left">Then to locate the pixel at line y, column x, component d simply write: + </div> + <div align="left"> + + <pre>float value; +if (is_packed) +value = idata[y*width*depth + x*depth + d] +else +value = idata[d*width*height + y*width + x]</pre> + + </div> + <div align="left"> + <p align="left">But notice that this code will return values at different pixel locations for top down and bottom up + orientations.</div> + +<div align="left"> + <h3 align="left"><a name="imImage">imImage</a></h3> +</div> + + <div align="left"> + <p align="left">To use the <b>imImage</b> structure you must include the <im_image.h> header.</div> + <div align="left"> + <p align="left">To create an <b>imImage</b> structure you can do it in several ways:</div> + +<div align="left"> + + + <pre>int width, height, color_space, data_type, palette_count; +long *palette; +void* buffer + +imImage* image; + +image = imImageCreate(width, height, color_space, data_type) +image = imImageInit(width, height, color_space, data_type, buffer, palette, palette_count) +image = imImageDuplicate(image) +image = imImageClone(image) </pre> + + <p>The <b>imImageInit</b> function allow you to initialize an <b>imImage</b> structure with an user allocated + buffer. This is very useful if you use your own image structure and wants to temporally use the image processing + functions of the library.</p> + <p>To destroy the <b>imImage</b> structure simply call <b>imImageDestroy(image)</b>. If you do "<b>data[0] + = NULL</b>" before calling the destroy function then the raw data buffer will not be destroyed.</p> + +</div> + + <div align="left"> + <p align="left">The <b>imImage</b> data buffer is allocated like the raw data buffer. + </div> + <div align="left"> + <p align="left">The separated color components are arranged one after another, but we access the data through an + array of pointers each one starting at the beginning of each color component. So + <b>image->data[0]</b> + contains a pointer to all the data, and <b>image->data[1]</b> is a short cut to the second component and so + on. With this you can use <b>image->data[0]</b> as a starting point for all the data, or use it as the first + component.</div> + +<div align="left"> + + + <pre>count = width*height; +unsigned char* idata = (unsigned char*)image->data[0]; +for (int i = 0; i < count; i++) +{ + idata[i] = 255; +}</pre> + + <p>or</p> + + <pre>for (int d = 0; d < image->depth; d++) +{ + unsigned char* idata = (unsigned char*)image->data[d]; + + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + int offset = y * width + x; + + idata[offset] = 255; + } + } +}</pre> + + +</div> +<div align="left"> + + <p align="left">The <b>imImage</b> structure contains all the image information obtained from a file, because it + also has support for alpha, attributes and the palette. The palette can be used for + <b>IM_MAP</b> images and + for pseudo color of <b>IM_GRAY</b> images.</p> + +</div> + + <div align="left"> + <p align="left">An important subset of images is what we call a <b>Bitmap</b> image. It is an image that can be + directly used into the graphics display. For Bitmap images the color space must be + <b>IM_RGB</b>, <b>IM_MAP</b>, + <b>IM_GRAY</b> or <b>IM_BINARY</b>, and the data type must be <b>IM_BYTE</b>.</div> + <div align="left"> + <p align="left">The conversion between image data types, color spaces and the conversion to bitmap are defined only + for the <b>imImage</b> structure.</div> + + +</body> + +</html> diff --git a/html/en/rep_samples.html b/html/en/rep_samples.html new file mode 100644 index 0000000..5c729a8 --- /dev/null +++ b/html/en/rep_samples.html @@ -0,0 +1,71 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<title>Representation Samples</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Image Representation Samples</h1> +<p>See the <a href="rep_guide.html">Representation Guide</a> for simple image +representation +samples.</p> +<h3><a name="im_info">Information</a></h3> + + <p>This is a command line application that displays information obtained from + a file using the IM I/O functions, basically <b>imFile</b> functions. It + depends only on the IM main library.</p> + <p>Here is an output sample:</p> + + <pre>IM Info + File Name: + exif_test.tif + File Size: 9.00 Mb + Format: TIFF - Tagged Image File Format + Compression: NONE + Image Count: 1 + Image #0 + Width: 2048 + Height: 1536 + Color Space: RGB + Has Alpha: No + Is Packed: Yes + Is Top Down: Yes + Data Type: byte + Data Size: 9.00 Mb + Attributes: + YResolution: 72.00 + XResolution: 72.00 + DateTime: 2004:01:14 11:30:11 + Make: SONY + ResolutionUnit: DPI + Model: CD MAVICA + Photometric: 2</pre> + + <p>You can view the source code here: <a href="../download/im_info.cpp"> + im_info.cpp</a></p> + +<h3><a name="im_view">View Using IUP and CD</a></h3> + + <p>This application uses IUP and CD to create a window with a canvas and draw + the image into that canvas. It is a very simple application, no zoom nor + scrollbar management. The image is obtained from a file using the IM I/O + functions, but using the <b>imImage</b> structure to make the implementation + easier.</p> + <p>For more about IUP see + <a target="_blank" href="http://www.tecgraf.puc-rio.br/iup"> + http://www.tecgraf.puc-rio.br/iup</a> and more about CD see + <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd"> + http://www.tecgraf.puc-rio.br/cd</a>.</p> + <p>You can view the source code here: <a href="../download/im_view.c"> + im_view.c</a>, or download it with some makefiles + <a href="../download/im_view.zip">im_view.zip</a>.</p> + + +</body> + +</html> diff --git a/html/en/representation.html b/html/en/representation.html new file mode 100644 index 0000000..1ae5394 --- /dev/null +++ b/html/en/representation.html @@ -0,0 +1,138 @@ +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>Representation</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Image Representation Overview</h1> +<h3>Width and Height</h3> + + <p>In the IM library images are 2D matrices of pixels defining <b>width</b> and <b>height</b>. Stacks, Animations, + Videos and Volumes are represented as a sequence of individual images. </p> + +<h3>Color Space</h3> + + <p>The pixels can have one of several <b>color spaces</b>: </p> + <ul> + <li><b>IM_RGB</b></li> + <li><b>IM_MAP</b></li> + <li><b>IM_GRAY</b></li> + <li><b>IM_BINARY</b></li> + <li><b>IM_CMYK</b></li> + <li><b>IM_YCBCR</b></li> + <li><b>IM_LAB</b></li> + <li><b>IM_LUV</b></li> + <li><b>IM_XYZ</b> . </li> + </ul> + <p><b>IM_MAP</b> is a subset of the <b>IM_RGB</b> color space. It can have a maximum of 256 colors. Each + value is an index into a RGB palette.</p> + <p><b>IM_GRAY</b> usually means luma (nonlinear Luminance), but it can represent any other intensity value that + is not necessarily related to color.</p> + <p><b>IM_BINARY</b> is a subset of the <b>IM_GRAY</b> color space, and it has only 2 colors black and + white. Each value can be 0 or 1. But for pratical reasons we use one byte to store it.</p> + <p>The other color spaces are standard CIE color spaces, except CMYK that does not have a clear definition without + other parameters to complement it.</p> + +<h3>Data Type</h3> + + <p>There are several numeric representations for the color component, or several <b>data types</b>:</p> + <ul> + <li><b>IM_BYTE</b></li> + <li><b>IM_USHORT</b></li> + <li><b>IM_INT</b></li> + <li><b>IM_FLOAT</b></li> + <li><b>IM_CFLOAT</b>. </li> + </ul> + <p>There is no bit type, binary images use 1 byte (waist space but keep processing simple).</p> + +<h3>Color Mode Flags</h3> + + <p>To avoid defining another image parameter we also use a parameter called <b>color_mode</b> that it is composed by + the <b>color_space</b> plus some <b>flags</b>, i.e. <b>color_mode = color_space + flags</b>. The flags are binary + combined with the color space, for example color_mode = IM_RGB | IM_XXX. And several flags can be combined in the same + color_mode. </p> + <p>There are 3 flags:</p> + <ul> + <li><b>IM_ALPHA</b></li> + <li><b>IM_PACKED</b></li> + <li><b>IM_TOPDOWN</b></li> + </ul> + <p>When a flag is absent the opposite definition is assumed. For simplicity we define some macros that help handling + the color mode:</p> + <ul> + <li><b>imColorModeSpace</b></li> + <li><b>imColorModeHasAlpha</b></li> + <li><b>imColorModeIsPacked</b></li> + <li><b>imColorModeIsTopDown</b></li> + </ul> + <h4>Color Components Packaging (<b>IM_PACKED or unpacked)</b></h4> + + <p>The number of components of the color space defines the depth of the image. The color components can be packed + sequentially in one plane (like rgbrgbrgb...) or separated in several planes (like rrr...ggg...bbb...). Packed color + components are normally used by graphics systems. We allow these two options because many users define their own + image structure that can have a packed or an separated organization. The following picture illustrates the + difference between the two options:</p> + + <p align="center"><img border="0" src="paking.gif" width="626" height="232"><br> + <b>(flag not defined) + IM_PACKED</b></p> + <p align="center"><b>Separated and Packed RGB Components</b></p> + <h4>Alpha Channel (<b>IM_ALPHA or no alpha</b>)</h4> + + <p>An extra component, the <b>alpha</b> channel, may be present. The number of components is then increased by one. + Its organization follows the rules of packed and unpacked components.</p> + + <h4>Orientation (<b>IM_TOPDOWN or bottom up)</b></h4> + + <p>Image orientation can be bottom up to top with the origin at the bottom left corner, or top down to bottom with + the origin at the top left corner. </p> + + <p align="center"><img border="0" src="topdown.gif" width="538" height="280"></p> + <p align="center"><b>IM_TOPDOWN</b> <b> + (flag not defined)</b></p> + <p align="center"><b>Top Down and Bottom Up Orientations</b></p> + <h4>Examples</h4> + + <p><b>IM_RGB</b> | <b>IM_ALPHA</b> - rgb color space with an alpha channel, bottom up orientation and + separated components<br> + <b>IM_GRAY</b> | <b>IM_TOPDOWN</b> - gray color space with no alpha channel and top down orientation<br> + <b>IM_RGB</b> | <b>IM_ALPHA</b> | <b>IM_PACKED</b> - rgb color space with an alpha channel, bottom + up orientation and packed components</p> + + +<h3>Raw Data Buffer</h3> + + <p>So these four parameters define our raw image data: <b>width</b>, <b>height</b>, <b>color_mode</b> and <b>data_type</b>. + The raw data buffer is always byte aligned and each component is stored sequentially in the buffer following the + specified packing. </p> + <p>For example, if a RGB image is 4x4 pixels it will have the following organization in memory:</p> + + <pre><b>RRRR</b>RRRR<b>RRRR</b>RRRR<b>GGGG</b>GGGG<b>GGGG</b>GGGG<b>BBBB</b>BBBB<b>BBBB</b>BBBB - for non packed components +0 1 2 3 0 1 2 3 0 1 2 3</pre> + <pre><b>RGBRGBRGBRGB</b>RGBRGBRGBRGB<b>RGBRGBRGBRGB</b>RGBRGBRGBRGB - for packed components +0 1 2 3</pre> + + <p>In bold we visualy marked some lines of data.</p> + +<hr> +<h3>imImage</h3> + + <p>We could restrict the data organization by eliminating the extra flags, but several users requested these features + in the library. So we keep them but restricted to raw data buffers. </p> + <p>For the high level image processing functions we created a structure called <b>imImage</b> that eliminates the + extra flags and assume <u>bottom up orientation</u> and <u>separated components</u>. Alpha channel is supported as an + extra component.</p> + <p>The <b>imImage</b> structure is defined using four image parameters: <b>width</b>, <b>height</b>, <b>color_space</b> + and <b>data_type</b>. It is an open structure in C where you can access all the parameters. In addition to the 4 + creation parameters there are many auxiliary parameters like <b>depth</b>, <b>count</b>, <b>line_size</b>, <b> + plane_size</b> and <b>size</b>. </p> + + +</body> + +</html> diff --git a/html/en/samples.html b/html/en/samples.html new file mode 100644 index 0000000..b659a25 --- /dev/null +++ b/html/en/samples.html @@ -0,0 +1,163 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<title>Samples</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Complete Samples</h1> +<h3><code>im_info</code></h3> + + <p>This is a command line application that displays information obtained from a file using the IM I/O functions, + basically <b>imFile</b> functions. It depends only on the IM main library.</p> + <p>Here is an output sample:</p> + + <pre>IM Info + File Name: + exif_test.tif + File Size: 9.00 Mb + Format: TIFF - Tagged Image File Format + Compression: NONE + Image Count: 1 + Image #0 + Width: 2048 + Height: 1536 + Color Space: RGB + Has Alpha: No + Is Packed: Yes + Is Top Down: Yes + Data Type: byte + Data Size: 9.00 Mb + Attributes: + YResolution: 72.00 + XResolution: 72.00 + DateTime: 2004:01:14 11:30:11 + Make: SONY + ResolutionUnit: DPI + Model: CD MAVICA + Photometric: 2</pre> + + <p>You can view the source code here: <a href="../download/im_info.cpp">im_info.cpp</a></p> + +<h3><code>im_copy</code></h3> + + <p>This is a command line application that copies all the information from one file to another using the IM I/O + functions. It depends only on the IM main library. It is usefull for testing the drivers.</p> + <p>You can view the source code here: <a href="../download/im_copy.cpp">im_copy.cpp</a></p> + +<h3><code>proc_fourier</code></h3> + + <p>This is another command line application that process an image in the Fourier Frequency Domain. In this domain the + image is a map of the spatial frequencies of the original image. It depends on the IM main library and on the IM_FFTW + library. The FFTW is a very fast Fourier transform, but is contaminated by the GPL license, so everything must be also + GPL. To use it in a commercial application you must contact the MIT and pay for a commercial license.</p> + <p>Se also <a href="doxygen/group__transform.html)">Reference / Image Processing / Domain + Transform Operations</a>.</p> + <p>You can view the source code here: <a href="../download/proc_fourier.cpp">proc_fourier.cpp</a></p> + +<h3><code>im_view</code></h3> + + <p>This application uses IUP and CD to create a window with a canvas and draw the image into that canvas. It is a very + simple application, no zoom nor scrollbar management. The image is obtained from a file using the IM I/O functions, + but using the <b>imImage</b> structure to make the implementation easier.</p> + <p>For more IUP <a target="_blank" href="http://www.tecgraf.puc-rio.br/iup">http://www.tecgraf.puc-rio.br/iup</a> and + more CD <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd">http://www.tecgraf.puc-rio.br/cd</a></p> + <p>You can view the source code here <a href="../download/im_view.c">im_view.c</a>, or download it with some makefiles + <a href="../download/im_view.zip">im_view.zip</a>.</p> + +<h3><code>glut_capture</code></h3> + + <p>This application uses GLUT and OpenGL to create a window with a canvas and draw the image into that canvas. But the + image is obtained from a capture device. The image can be processed before display and a sequence of captured images + can be saved in an AVI file during capture.</p> + <p>You can view the source code here: <a href="../download/glut_capture.c">glut_capture.c</a></p> + +<h3><code>iupglcap</code></h3> + + <p>This application uses IUP and OpenGL to create a window with two canvases and draw a video capture image into one + canvas. A processed image can be displayed in the second canvas. It can also process frames from a video file. It is + very usefull for Computer Vision courses..</p> + <p>You can download the source code and projects for Visual C++, Borland C++ Builder X and Dev-Cpp, here: + <a href="../download/iupglcap.zip">iupglcap.zip</a> You will need to download IUP, CD and IM libraries for the + compiler you use</p> + +<h3><code>IMLAB</code></h3> + + <p>If you want to see a more complex application with all the IM features explored the IMLAB is a complete example. It + displays each image in an individual image with zoom and pan capabilities. All the IM processing operations are + available together with some extra operations.</p> + <p>For more IMLAB go to <a href="http://www.tecgraf.puc-rio.br/~scuri/imlab"> + http://www.tecgraf.puc-rio.br/~scuri/imlab</a>.</p> + +<h3>Lua Samples</h3> + + <p>To retreive information from an image file:</p> + + <pre>require"imlua" +local ifile, error = im.FileOpen(file_name) +local format, compression, image_count = ifile:GetInfo() +local format_desc = im.FormatInfo(format) +for i = 1, image_count do + local width, height, color_mode, data_type, error = ifile:ReadImageInfo(i) +end +ifile:Close() </pre> + + <p>To edit pixels in an image and save the changes:</p> + + <pre>require"imlua" + +local image = im.FileImageLoad(filename) + +local r = image[0] +local g = image[1] +local b = image[2] + +for row = 0, image:Height() - 1, 10 do + for column = 0, image:Width() - 1, 10 do + r[row][column] = 0 + g[row][column] = 0 + b[row][column] = 0 + end +end + +image:Save("edit.bmp", "BMP")</pre> + + <p>To render noise:</p> + + <pre>require"imlua" +require"imlua_process" +local image = im.ImageCreate(500, 500, im.RGB, im.BYTE) +im.ProcessRenderRandomNoise(image) +image:Save("noise.tif", "TIFF") </pre> + + <p>To render using the CD library:</p> + + <pre>require"imlua" +require"cdlua" +require"imlua_cd" + +local image = im.ImageCreate(500, 500, im.RGB, im.BYTE) +local canvas = image:cdCreateCanvas() -- Creates a CD_IMAGERGB canvas + +canvas:Activate() +canvas:Clear() +canvas:Font("Times", cd.BOLD, 24) +canvas:Text(100, 100, "Test") +canvas:Line(0,0,100,100) +canvas:KillCanvas(canvas) + +image:Save("new.bmp", "BMP") </pre> + + <p>Check the file <a href="../download/samples_imlua5.tar.gz">samples_imlua5.tar.gz</a> + or <a href="../download/samples_imlua5.zip">samples_imlua5.zip</a> for several samples in Lua. For + some of them you will need also the CD and the IUP libraries. </p> + + +</body> + +</html> diff --git a/html/en/storage.html b/html/en/storage.html new file mode 100644 index 0000000..138d539 --- /dev/null +++ b/html/en/storage.html @@ -0,0 +1,72 @@ +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>Storage</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Storage Overview</h1> + + <p>Essentially all the file formats save the same image data. There is no such + thing like a GIF image, instead we have a color indexed image that can be + saved in a file with a GIF format, or a TIFF format, etc. However the + compression encoding can be lossy and degrade the original image. The point is + file formats and image data are two different things.</p> + <p>A file format is a file organization of the image data and its attributes. + The IM library model considers all the file formats under the same model, + including image, video, animation, stacks and volume file formats. When there + is more than one image each one is treated as an independent frame. Each frame + can have its own parameters and set of attributes.</p> + <p>The abstract model we use has the following structure:</p> + <div align="center"> + <center> + <table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="300" id="AutoNumber1" cellpadding="3"> + <tr> + <td align="center" bgcolor="#C0C0C0"><b>Format Identifier</b></td> + </tr> + <tr> + <td align="center" bgcolor="#C0C0C0"><b>Compression</b></td> + </tr> + <tr> + <td align="center" bgcolor="#C0C0C0"><b>Image Count</b></td> + </tr> + <tr> + <td align="center" style="border-top-style: solid; border-top-width: 1" bgcolor="#FFFF99"> + Image Information:<br> + parameters, attributes, palette</td> + </tr> + <tr> + <td align="center" bgcolor="#FFFF99">Image Data</td> + </tr> + <tr> + <td align="center" bgcolor="#FFFFCC">Image Information:<br> + parameters, attributes, palette</td> + </tr> + <tr> + <td align="center" bgcolor="#FFFFCC">Image Data</td> + </tr> + <tr> + <td align="center" bgcolor="#FFFF99">...</td> + </tr> + </table> + </center> + </div> + <p>The compression is usually the same for all the images in the file, but it + can be changed after loading an image. For tradicional file formats image + count is always 1. Image information must always be loaded or saved before + image data.</p> + <p>We consider only formats that starts with a signature so we can recognize + the format without using its file extension. If there is more than one driver + that handles the same signature the first registered driver will open the + file. Since the internal drivers are automatically registered all the external + drivers can be loaded first if no <b>imFile</b> function has been called. In + this way you can also control which external driver goes first.</p> + + +</body> + +</html> diff --git a/html/en/storage_guide.html b/html/en/storage_guide.html new file mode 100644 index 0000000..e225ae5 --- /dev/null +++ b/html/en/storage_guide.html @@ -0,0 +1,311 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Storage Guide</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Storage Guide</h1> +<h3 align="left"><a name="read">Reading</a></h3> + + <p>When reading the file extension is not relevant to determine the file + format, but it is used to speed up the process of finding the correct format. + With few exceptions the format drivers that access multiple images can read + them in any sequence you want. </p> + <p>During the read process the original data can be converted to some options + of user data. Not all conversions are available. You can convert any data to a + bitmap version of it, and you can select any of the color mode flags<b> + IM_ALPHA</b>, <b>IM_PACKED</b> and <b>IM_TOPDOWN</b>, + regardless of the file original configuration.</p> + <p>Remember that even if all the images in the file have the same parameters + you still have to call <b>imFileReadImageInfo</b> before calling <b>imFileReadImageData</b>. </p> + <p>In the following example all the images in the file are loaded.</p> + + <pre>char format[10], compression[10]; +int error, image_count; +int width, height, color_mode, data_type; +void* data; + +imFile* ifile = imFileOpen("test.tif", &error); +if (error != IM_ERR_NONE) + // handle the error + +imFileGetInfo(ifile, format, compression, &image_count); + +for (i = 0; i < image_count, i++) +{ + error = imFileReadImageInfo(ifile, i, &width, &height, &color_mode, &data_type); + if (error != IM_ERR_NONE) + // handle the error + + // prepare data + + error = imFileReadImageData(ifile, data, 0, -1); // no bitmap convertion, use original color mode flags + if (error != IM_ERR_NONE) + // handle the error + + // store data somewhere +} + +imFileClose(ifile); </pre> + + <p>A more simple code loads only the first image in the file:</p> + + <pre>imFile* ifile = imFileOpen(file_name, &error); + +imFileReadImageInfo(ifile, 0, &width, &height, &color_mode, &data_type); + +imFileReadImageData(ifile, data, 0, -1); + +imFileClose(ifile); </pre> + + <p>If you are using the <b>imImage</b> structure it is easier:</p> + + <pre>imFile* ifile = imFileOpen(file_name, &error); + +imImage* image = imFileLoadImage(ifile, 0, &error);</pre> + <pre>// or use imFileLoadBitmap to force a bitmap conversion + +imFileClose(ifile);</pre> + + <p>Or the simplest version:</p> + + <pre>imImage* image = imFileImageLoad(file_name, 0, &error);</pre> + + +<h3 align="left"><a name="write">Writing</a></h3> + + <p>When writing there is no color space or data type conversion. Only color + mode flags can be different: <b>IM_ALPHA</b>, <b>IM_PACKED</b> and + <b>IM_TOPDOWN</b>. You just have to describe your data and the <b>imFileWriteImageData</b> will handle the color mode flag differences.</p> + <p>Of course you still have to check the error codes because, not all color + spaces and data types are supported by each format.</p> + <p>When saving a sequence of images you must provide each image in the order + that they will be in the file. For a video or animation start from frame 0 and + go on, you can not jump or change the frame order. Also when saving videos you + should not forget to save the numbers of frames per second in the attribute + "FPS", the default value is 15.</p> + <p>For all the formats it is not necessary to set the compression, each driver + will choose a default compression. But you may set it using the function <b>imFileSetInfo</b>.</p> + <p>To save several images to the same file:</p> + + <pre>int error, width, height; +void *data; + +imFile* ifile = imFileNew("test.tif", "TIFF", &error); +if (error != IM_ERR_NONE) + // handle the error + +for (i = 0; i < image_count, i++) +{ + error = imFileWriteImageInfo(ifile, width, height, IM_RGB, IM_BYTE); + if (error != IM_ERR_NONE) + // handle the error + + error = imFileWriteImageData(ifile, data); + if (error != IM_ERR_NONE) + // handle the error +} + +imFileClose(ifile); </pre> + + <p>But remember that not all file formats supports several images. To save + just one image is more simple:</p> + + <pre>imFile* ifile = imFileNew(file_name, format, &error); + +error = imFileWriteImageInfo(ifile, width, height, color_mode, data_type); + +error = imFileWriteImageData(ifile, data); + +imFileClose(ifile); </pre> + + <p>If you are using the <b>imImage</b> structure it is easier:</p> + + <pre>imFile* ifile = imFileNew(file_name, format, &error); + +error = imFileSaveImage(ifile, image); + +imFileClose(ifile);</pre> + + <p>Or the simplest version:</p> + + <pre>error = imFileImageSave(file_name, format, image);</pre> + + +<h3>Error Messages</h3> + + <p>Here is a sample error message display using IUP and IM error codes:</p> + + <pre>static void imIupErrorMessage(int error, int interactive) +{ + char* lang = IupGetLanguage(); + char *msg, *title; + if (strcmp(lang, "ENGLISH")==0) + { + title = "Error"; + switch (error) + { + case IM_ERR_OPEN: + msg = "Error Opening File."; + break; + case IM_ERR_MEM: + msg = "Insuficient memory."; + break; + case IM_ERR_ACCESS: + msg = "Error Accessing File."; + break; + case IM_ERR_DATA: + msg = "Image type not Suported."; + break; + case IM_ERR_FORMAT: + msg = "Invalid Format."; + break; + case IM_ERR_COMPRESS: + msg = "Invalid or unsupported compression."; + break; + default: + msg = "Unknown Error."; + } + } + else + { + title = "Erro"; + switch (error) + { + case IM_ERR_OPEN: + msg = "Erro Abrindo Arquivo."; + break; + case IM_ERR_MEM: + msg = "Memória Insuficiente."; + break; + case IM_ERR_ACCESS: + msg = "Erro Acessando Arquivo."; + break; + case IM_ERR_DATA: + msg = "Tipo de Imagem não Suportado."; + break; + case IM_ERR_FORMAT: + msg = "Formato Inválido."; + break; + case IM_ERR_COMPRESS: + msg = "Compressão Inválida ou não Suportada."; + break; + default: + msg = "Erro Desconhecido."; + } + } + + if (interactive) + IupMessage(title, msg); + else + printf("%s: %s", title, msg); +} +</pre> + + +<h3><a name="formats">About File Formats</a></h3> + + <p>TIFF is still the most complete format available. It could be better if + Adobe releases the revision 7, but it is on stand by. TIFF supports all the IM + image representation concepts. In fact we were partially inspired by the TIFF + specification. My suggestion is whenever possible use TIFF.</p> + <p>But TIFF may not be the ideal format for many situations. The W3C standards + include only JPEG, GIF and PNG for Web browsers. JPEG forces the image to be + RGB or Gray with a lossy compressed. GIF forces the image to be MAP with LZW + compression. PNG forces the image to be RGB, MAP, Gray or Binary, with Deflate + compression. So these characteristics are necessary to force small values for + faster downloads.</p> + <p>JPEG is to be used for photographic content, PNG should be used for the + remaining cases, but GIF is still the best to do simple animated images.</p> + <p>Except for some specific cases where a format is needed for compatibility, + the other formats are less important. TGA, PCX, RAS, SGI and BMP have almost + the same utility.</p> + <p>JP2 must be used for JPEG-2000 compression, would be nice if a new TIFF + specification includes this standard.</p> + <p>Since PNM has a textual header it is very simple to teach for students so + they can actually "see" the header. It is also a format easy to share images, + but it does not do much more than that.</p> + <p>The TIFF and the GIF format also have support for multiple images. This + does not necessarily defines an animation, pyramid nor a volume, but some + times they are used in these ways. </p> + <p>GIF became very popular to build animations for the Web, and since the LZW + patent expired Unisys realized that charging the usage isn't going to work and + so they did not renew it. LZW is fully supported at IM.</p> + <p>IM also supports video formats like AVI and WMV as external libraries. In + these cases the frames are also loaded as a sequence of individual images. + Sound is not supported.</p> + <p>TIFF, JPEG and PNG have an extensive list of attributes, most of them are + listed in the documentation, but some custom attributes may come up when + reading an image from file.</p> + +<h3><a name="filesdk">New File Formats</a></h3> + + <p>Again the easiest way is to look at the source code of an already + implemented format. The RAS, BMP, TGA and SGI formats are very simple to + follow.</p> + <p>Basically you have to implement a class that inherits from <b>imFormat</b> + and implement its virtual methods. You can use the <b>imBinFile</b> functions + for I/O or use an external SDK.</p> + <p>For more information see + <a href="doxygen/group__filesdk.html">File + Format SDK</a>.</p> + +<h3><a name="binfilemem">Memory I/O and Others</a></h3> + + <p>For the majority of the formats, with the exception of the ones that use + external SDKs, the I/O is done by the <b>imBinFile</b> module.</p> + <p>This module can be configured to access other types of media by + implementing a driver. There are some predefined drivers see + <a href="doxygen/group__binfile.html">Reference + / Utilities / Binary File Access</a>.</p> + <p>One very useful is the <b>Memory Buffer</b> where you can read and write a + file in memory. The activation is very simple, it needs to happen just before + the <b>imFileOpen/imFileNew</b> functions. But the file name must be a + pointer to an <b>imBinMemoryFileName </b>structure instead of a string. + Se the example bellow:</p> + + <pre>int old_mode = imBinFileSetCurrentModule(IM_MEMFILE); + +imBinMemoryFileName MemFileName; // This structure must exists + while the file remains open.<br> + MemFileName.buffer = NULL; // Let the library initializes the buffer, <br> + + // but it must be freed the the application, free(MemFileName.buffer) + MemFileName.size = 1024; // The initial size<br> + MemFileName.reallocate = 1.5; // The reallocation will increase 50% the + buffer.<br> + + // This is used only when writing with a variable buffer.<br> + + // Use 0 to fix the buffer size. + +int error;<br> + imFile* ifile = imFileNew((const char*)&MemFileName, "GIF", &error); + +imBinFileSetCurrentModule(old_mode); // The mode needs to be active + only for the imFileOpen/imFileNew call. + +if (error != IM_ERR_NONE) ....</pre> + + <p>Another driver interesting is the <b>Subfile</b> where you can read and + write from a file that is already open. This is very important for formats + that can have an embedded format inside. In this module the file_name + <span class="comment">is a pointer to an <b>imBinFile</b> + structure from any other module that uses the <b>imBinFile</b> functions. The + <b>imBinFileSize</b> will return the full file size, but the <b>imBinFileSeekTo</b> and + <b>imBinFileTell</b> functions will + compensate the position when the subfile was open.</span></p> + <p><span class="comment">Using </span><b>imBinFileSetCurrentModule(IM_SUBFILE)</b> just like the example above will + allow you to open a subfile using the <b>imFileOpen/imFileNew</b> + functions.</p> + + +</body> + +</html> diff --git a/html/en/storage_samples.html b/html/en/storage_samples.html new file mode 100644 index 0000000..d4f5c41 --- /dev/null +++ b/html/en/storage_samples.html @@ -0,0 +1,79 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<title>Storage Samples</title> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>More Storage Samples</h1> +<p>See the <a href="storage_guide.html">Storage Guide</a> for simple storage +samples.</p> +<h3><a name="im_info">Information</a></h3> + + <p>This is a command line application that displays information obtained from + a file using the IM I/O functions, basically <b>imFile</b> functions. It + depends only on the IM main library.</p> + <p>Here is an output sample:</p> + + <pre>IM Info + File Name: + exif_test.tif + File Size: 9.00 Mb + Format: TIFF - Tagged Image File Format + Compression: NONE + Image Count: 1 + Image #0 + Width: 2048 + Height: 1536 + Color Space: RGB + Has Alpha: No + Is Packed: Yes + Is Top Down: Yes + Data Type: byte + Data Size: 9.00 Mb + Attributes: + YResolution: 72.00 + XResolution: 72.00 + DateTime: 2004:01:14 11:30:11 + Make: SONY + ResolutionUnit: DPI + Model: CD MAVICA + Photometric: 2</pre> + + <p>You can view the source code here: <a href="../download/im_info.cpp"> + im_info.cpp</a></p> + +<h3><a name="im_copy">Copy</a></h3> + + <p>This is a command line application that copies all the information from one + file to another using the IM I/O functions. It depends only on the IM main + library. It is usefull for testing the drivers.</p> + <p>You can view the source code here: <a href="../download/im_copy.cpp"> + im_copy.cpp</a></p> + + +<h3><a name="loadbmp">Load Bitmap from Resource File</a></h3> +<p>In Windows if you have a bitmap stored in a resource file, like this:</p> +<span LANG="EN"> +<pre>bitmap_test BITMAP bitmap_test.bmp</pre> +</span> +<p>The you could retreive it using the following code:</p> +<pre>#include <windows.h> +#include <im.h> +#include <im_dib.h> + +HBITMAP hBmp = LoadBitmap(hInstance, "bitmap_test"); +imDib* dib = imDibFromHBitmap(hBmp, NULL); +imImage* image imDibToImage(dib); +imDibDestroy(dib); +</pre> + + +</body> + +</html> diff --git a/html/en/to_do.html b/html/en/to_do.html new file mode 100644 index 0000000..c9de95e --- /dev/null +++ b/html/en/to_do.html @@ -0,0 +1,60 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<title>To Do</title> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" type="text/css" href="../style.css"> +<style type="text/css"> +.style1 { + color: #008000; +} +</style> +</head> + +<body> + +<h1>To Do</h1> +<h3>General</h3> +<ul> + <li><font color="#008000">MOV (using QuickTime SDK and QT4Linux) </font></li> + <li><font color="#008000">DICOM</font></li> + <li><font color="#008000">TIFF Annotations</font></li> + <li><font color="#008000">Linux Capture (using Video4Linux) </font></li> + <li><font color="#008000">Use libavcodec and libavformat in Linux. AVI using libavifile in Linux (UNIX ?) + </font></li> + <li><font color="#008000">MPEG-2 (using MSSG?)</font></li> + <li class="style1">VC-1 Coded using Microsoft VC-1 Encoder SDK</li> + <li><font color="#FF0000">In SunOS using the Sun WorkShop 6 C++, an error occurs when linking an application.</font></li> + <li><font color="#FF0000">In AIX we do not have the C++ for AIX installed, so the library is not available.</font></li> +</ul> +<h3>For the Processing library:</h3> +<ul> + <li>Dithering Techniques</li> + <li>Adaptative Thresholds</li> + <li>Warping </li> + <li>Rolling Ball Filter</li> + <li>Butterworth, Deconvolution </li> + <li>Inverse Filter, Homomorphic Restoration</li> + <li>Watershed, Convex Hull</li> + <li>Other Measures </li> +</ul> +<h3>Our plans for the future include:</h3> +<ul> + <li><font color="#008000">Imaging Tutorial in the documentation </font></li> + <li>Support for the Intel® Integrated Performance Primitives</li> + <li>JPEG and TIFF Thumbnails</li> + <li>Formats: FLI, DV, FPX (Flash Pix), EXR (Industrial Light & Magic High Dynamic Range Format), MNG, + Microsoft HD Photo </li> + <li>ECW write</li> + <li>OpenML?</li> + <li>WIA and TWAIN?</li> +</ul> +<hr> +<p><font color="#FF0000">Suggestions?</font><a href="mailto:%20im@tecgraf.puc-rio.br"> im@tecgraf.puc-rio.br</a></p> +<p> </p> + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/toolkits.html b/html/en/toolkits.html new file mode 100644 index 0000000..1f0c8f5 --- /dev/null +++ b/html/en/toolkits.html @@ -0,0 +1,244 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<title>Other Toolkits</title> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" type="text/css" href="../style.css"> +</head> + +<body> + +<h1>Comparing IM with Other Imaging Toolkits</h1> + + <p>Still today there is a need for something easier to code and understand in + Imaging. The available free libraries are sometimes close, sometimes very far + from “easier”. IM is an unexplored solution and proposed as a simple and clean + one. It is another Imaging tool with a different approach to the many + possibilities in the area. Its organization was designed so it can be used for + teaching Imaging concepts. We invite you to try it.</p> + <p>First we list some libraries mainly target for storage, then some + scientific libraries, and then a small comparsion of IM and those libraries.</p> + <hr> + <p>Here are some free storage libraries:</p> + <p><b>Imlib2</b></p> + + <p class="info">Last Update 2003-09 / Version 1.1.0<br> + <a target="_blank" href="http://www.enlightenment.org/pages/imlib2.html"> + http://www.enlightenment.org/pages/imlib2.html</a> <br> + Language C<br> + Documentation is terrible. Depends on the X-Windows System libraries.<br> + It is designed for display/rendering performance.</p> + + <p><b>Corona</b></p> + + <p class="info">Last Update 2003-09 / Version 1.0.2<br> + <a target="_blank" href="http://corona.sourceforge.net/"> + http://corona.sourceforge.net/</a><br> + Language C++<br> + Very simple library. Only a few formats. Only bitmap images, no video. <br> + </p> + + <p><b>PaintLib</b></p> + + <p class="info">Last Update 2004-04 / Version 2.61<br> + <a target="_blank" href="http://www.paintlib.de/paintlib/"> + http://www.paintlib.de/paintlib/</a><br> + Language C++<br> + A very simple library.<br> + Has an interesting ActiveX component. Only bitmap images, no video.</p> + + <p><b>NetPBM</b></p> + + <p class="info">Last Update 2004-07 / Version 10.23<br> + <a target="_blank" href="http://netpbm.sourceforge.net/"> + http://netpbm.sourceforge.net/</a> <br> + Language C<br> + A traditional library that starts at the Pbmplus package more than 10 years + ago.<br> + Very stable, it has support for the PNM format family and many processing + operations. <br> + Only bitmap images, no video.</p> + + <p><b>DevIL ***</b></p> + + <p class="info">Last Update 2004-06 / Version 1.6.7 <br> + <a target="_blank" href="http://openil.sourceforge.net/"> + http://openil.sourceforge.net/</a> <br> + Language C (Has also a C++ Wrapper)<br> + Called initially OpenIL. Supports many formats and have a very interesting + API, that works very similar the OpenGL API (that's why the original name). + Also supports the display in several graphics systems. Has several data + types as OpenGL has.</p> + + <p><b>FreeImage ***</b></p> + + <p class="info">Last Update 2004-07 / Version 3.4.0<br> + <a target="_blank" href="http://freeimage.sourceforge.net/"> + http://freeimage.sourceforge.net/</a> <br> + Language C (Has also a C++ Wrapper)<br> + Supports many formats. Many data types, but only RGB and subclasses (gray, + map, etc).<br> + Very well written, stable and simple to use.</p> + + <p><b>ImageMagick and GraphicsMagick ***</b></p> + + <p class="info">Last Update 2004-07 / Version 6.0.3 || Last Update 2004-04 / Version + 1.0.6<br> + <a target="_blank" href="http://www.imagemagick.org/"> + http://www.imagemagick.org/</a> || + <a target="_blank" href="http://www.graphicsmagick.org/"> + http://www.graphicsmagick.org/</a><br> + Language C (Has also a C++ Wrapper)<br> + The two libraries are listed together because GraphicsMagick is totally and + explicitly based on ImageMagick version 5.5.2.<br> + They have very similar or identical APIs but the development process is + completely different. GraphicsMagick propose a more organized development + process (a more precise comparison requires detailed knowledge about the two + libraries).<br> + These are very complete libraries. They support lots of file formats, + several color spaces, but use only the byte data type.<br> + They use a big image structure with everything inside. Image creation may + involve about 40 parameters.</p> + + <hr> + <p>And here are some free scientific libraries:</p> + <p><b>TINA</b></p> + + <p class="info">Last Update 2002-03 / Version 4.0.2<br> + <a href="http://www.niac.man.ac.uk/Tina">http://www.niac.man.ac.uk/Tina</a> + <br> + Language C<br> + Very UNIX oriented. Lots of functions for Computer Vision. Developed by a + researcher of the University of Manchester.</p> + + <p><b>XITE</b></p> + + <p class="info">Last Update 2002-09 / Version 3.44<br> + <a target="_blank" href="http://www.ifi.uio.no/forskning/grupper/dsb/Software/Xite/"> + http://www.ifi.uio.no/forskning/grupper/dsb/Software/Xite/</a> <br> + Language C<br> + Very UNIX oriented, but compiles fine in Windows. Several separated command + line routines, it is a package not a library. But inspired several aspects + of the IM library. Seems to be not updated anymore. Developed by a + researcher of the University of Oslo.</p> + + <p><b>VIGRA</b></p> + + <p class="info">Last Update 2004-09 / Version 1.3.0<br> + <a href="http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/"> + http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/</a> <br> + Language C++<br> + STL based. Many operators. Developed by a researcher of the University of + Hamburg.</p> + + <p><b>Wild Magic</b></p> + + <p class="info">Last Update 2004-09 / Version 2.4<br> + <a href="http://www.magic-software.com/">http://www.magic-software.com/</a> + <br> + Language C++<br> + Game development oriented, very rich in mathematics. Developed by Magic + Software, Inc.</p> + + <p><b>VIPS</b></p> + + <p class="info">Last Update 2004-09 / Version 7.10.2<br> + <a href="http://www.vips.ecs.soton.ac.uk/">http://www.vips.ecs.soton.ac.uk/</a><br> + Language C/C++<br> + Support for very large images. Powerful macro laguage. Good implementation. + Many functions. Developed by researchers at the University of Southampton + and The National Gallery in the UK. </p> + + <p><b>MegaWave2</b></p> + + <p class="info">Last Update 2004-06 / Version 2.3<br> + <a href="http://www.cmla.ens-cachan.fr/Cmla/Megawave/"> + http://www.cmla.ens-cachan.fr/Cmla/Megawave/</a><br> + Language C<br> + Very UNIX oriented. Good implementation. Many functions. C preprocessor. + Developed by French researchers at l'École Normale Supérieure de Cachan. </p> + + <p><b>JAI </b></p> + + <p class="info">Last Update 2003-07 / Version 1.1.2<br> + <a target="_blank" href="http://java.sun.com/products/java-media/jai/index.jsp"> + http://java.sun.com/products/java-media/jai/index.jsp</a> <br> + Language Java<br> + It is becoming more and more popular. Java is slow than C/C++ but the + performance of the image processing operations is very acceptable. Also it + has several C optimized functions. Developed by the Sun Corporation.</p> + + <p><b>OpenCV ***</b></p> + + <p class="info">Last Update 2004-08 / Version 4.0<br> + <a target="_blank" href="http://sourceforge.net/projects/opencvlibrary/"> + http://sourceforge.net/projects/opencvlibrary/</a> <br> + Language C/C++<br> + Only a few formats but lots of image processing operations. One of the most + interesting libraries available. It is more than an Imaging library, it is + designed for Computer Vision. Developed by Intel Russian researchers.</p> + + <p><b>VTK ***</b></p> + + <p class="info">Last Update 2004-03 / Version 4.2<br> + <a target="_blank" href="http://www.vtk.org/">http://www.vtk.org/</a> <br> + Language C++<br> + Another very important library. Very huge. Much more than Imaging, includes + also 3D Computer Graphics and Visualization. Has a book about the library. + Developed by Kitware Inc.</p> + + <hr> + <p><b>IM</b></p> + + <p class="info">Last Update 2004-08 / Version 3.0.2<br> + <a href="http://www.tecgraf.puc-rio.br/im">http://www.tecgraf.puc-rio.br/im</a><br> + Language C/C++<br> + Support for several data types, i.e. scientific images and different + color spaces. Support for input and output of image sequences. Support for + generic image attributes (metadata), which includes several standard TIFF + tags, GeoTIFF tags and Exif tags. Image storage and capture data can be + accessed using an image structure or with raw data. Internal implementation + in C++ but with a simple C API. Code is portable for Windows and UNIX. Many + image processing operations.</p> + + <hr> + <h3>Comparsion</h3> + <p>The idea behind IM was to create a toolkit that was not so complex as + OpenCV, neither so big as VTK, but that can be used as a solid base to the + development of thesis and dissertations, as for commercial applications. </p> + <p>As the academic environment is very heterogeneous the IM project choose + some directives:</p> + <ul> + <li>Portability (Windows and UNIX)</li> + <li>C API</li> + <li>Totally Free, Open Source</li> + <li>Focus in Scientific Applications</li> + <li>Easy to Learn</li> + <li>Easy to Reuse</li> + </ul> + <p>Considering these directives there are only a few similar toolkits. Making + some exceptions the following should be mentioned: </p> + <ul> + <li>JAI - Java, Sun.com</li> + <li>VIGRA - C++ / STL Based, University</li> + <li>VIPS - Large Images / Macros, University</li> + <li>VTK - C++ / Huge / Visualization, Kitware.com</li> + <li>OpenCV – “best” similar choice, Intel.com </li> + </ul> + <p>Today OpenCV and VTK are the most professional and complete choices of free + libraries that are similar to IM. But they are more complicated than IM. For + instance VTK it is very large, it has about 700 C++ classes. </p> + <p>Although OpenCV has many resources, its code is very hard to reuse. The + simplicity of the IM code, mainly the image processing routines, make it a + good reference to be reused by other applications extracting only the code + needed with little changes. And can be used as an complement to learn image + processing algorithms and techniques.</p> + <hr> + <p>This page was last updated in Sep 2004.</p> + + +</body> + +</html> diff --git a/html/en/topdown.gif b/html/en/topdown.gif Binary files differnew file mode 100644 index 0000000..b0fa44f --- /dev/null +++ b/html/en/topdown.gif diff --git a/html/en/zlib.txt b/html/en/zlib.txt new file mode 100644 index 0000000..6447ba6 --- /dev/null +++ b/html/en/zlib.txt @@ -0,0 +1,33 @@ +Copyright notice: + + (C) 1995-2004 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* +receiving lengthy legal documents to sign. The sources are provided +for free but without warranty of any kind. The library has been +entirely written by Jean-loup Gailly and Mark Adler; it does not +include third-party code. + +If you redistribute modified sources, we would appreciate that you include +in the file ChangeLog history information documenting your changes. Please +read the FAQ for more information on the distribution of modified source +versions. |