diff options
author | scuri <scuri> | 2010-10-25 19:57:24 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-10-25 19:57:24 +0000 |
commit | 956d02af88db8d76262a30274bb4fecf47645c5f (patch) | |
tree | be3b6a5ee07104449137cd86fbe95df5cd330321 /html/en | |
parent | b007c2695ead1e484cf327765c47d8346f632447 (diff) |
*** empty log message ***
Diffstat (limited to 'html/en')
-rw-r--r-- | html/en/guide.html | 20 | ||||
-rw-r--r-- | html/en/representation.html | 4 | ||||
-rw-r--r-- | html/en/samples.html | 2 |
3 files changed, 18 insertions, 8 deletions
diff --git a/html/en/guide.html b/html/en/guide.html index f918cfa..6e8aba1 100644 --- a/html/en/guide.html +++ b/html/en/guide.html @@ -56,7 +56,7 @@ 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++" + <p>Even if your application 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> @@ -203,7 +203,7 @@ IM_FLOAT = GL_FLOAT</pre> <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> +glDrawPixels(image->width, image->height, GL_RGB, GL_UNSIGNED_BYTE, 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> @@ -221,15 +221,25 @@ glDrawPixels(image->width, image->height, GL_RGB, GL_UNSIGNED_BYTE, (GLvoi <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); +glReadPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, 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> + <p>And when using the <strong>imImage</strong> structure then you can + instead use the function <strong>imImageCreateFromOpenGLData</strong>. For + instance:</p> + + <pre>glPixelStorei(GL_PACK_ALIGNMENT, 1); /* data alignment must be 1 */ +glReadPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, gl_data); + +imImage* image = imImageCreateFromOpenGLData(width, height, GL_RGB, gl_data); +error = imFileImageSave(filename, format, image);</pre> + + <p>You can also do this + inside a loop to create an animation. </p> <h3><a name="compat">IM 2.x Compatibility</a></h3> diff --git a/html/en/representation.html b/html/en/representation.html index fbbf6a6..4c902cc 100644 --- a/html/en/representation.html +++ b/html/en/representation.html @@ -34,7 +34,7 @@ <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> + white. Each value can be 0 or 1. But for practical 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> @@ -117,7 +117,7 @@ <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> + <p>In bold we visually marked some lines of data.</p> <hr> <h3>imImage</h3> diff --git a/html/en/samples.html b/html/en/samples.html index a1473d6..ecdfd86 100644 --- a/html/en/samples.html +++ b/html/en/samples.html @@ -82,7 +82,7 @@ <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> + very useful 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> |