diff options
Diffstat (limited to 'www/api/api.html')
-rw-r--r-- | www/api/api.html | 146 |
1 files changed, 72 insertions, 74 deletions
diff --git a/www/api/api.html b/www/api/api.html index a7d6bee..35554a9 100644 --- a/www/api/api.html +++ b/www/api/api.html @@ -1,12 +1,14 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<!DOCTYPE html> +<html lang="en"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" /> -<title>GraphicsMagick Core C API</title> -<link rel="stylesheet" href="../docutils-articles.css" type="text/css" /> + <meta charset="utf-8"> + <meta content="en" name="language"> + <title>GraphicsMagick Core C API</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link media="screen" href="../docutils-articles.css" type="text/css" rel="stylesheet"> + </head> + <body> <div class="banner"> @@ -19,6 +21,7 @@ </form> </div> + <div class="navmenu"> <ul> <li><a href="../index.html">Home</a></li> @@ -32,9 +35,9 @@ <li><a href="../reference.html">Reference</a></li> </ul> </div> + <div class="document" id="graphicsmagick-core-c-api"> <h1 class="title">GraphicsMagick Core C API</h1> - <!-- -*- mode: rst -*- --> <!-- This text is in reStucturedText format, so it may look a bit odd. --> <!-- See http://docutils.sourceforge.net/rst.html for details. --> @@ -49,65 +52,64 @@ libGraphicsMagick.so, or GraphicsMagick.dll depending on your system.</p> documentation, please reference the <a class="reference external" href="types.html">types</a> documentation as required:</p> <blockquote> <ul class="simple"> -<li><a class="reference external" href="animate.html">Animate</a>: Interactively animate an image sequence</li> -<li><a class="reference external" href="annotate.html">Annotate</a>: Annotate an image with text</li> -<li><a class="reference external" href="attribute.html">Attribute</a>: Access key, value image attributes</li> -<li><a class="reference external" href="average.html">Average</a>: Average several images together</li> -<li><a class="reference external" href="cdl.html">ASC CDL</a> : Apply ASC CDL to image</li> -<li><a class="reference external" href="blob.html">Blob</a>: Read and write images to memory</li> -<li><a class="reference external" href="channel.html">Channel</a>: Import and export image channels as well as compute channel depth</li> -<li><a class="reference external" href="color.html">Color</a>: Methods to deal with image colors</li> -<li><a class="reference external" href="colormap.html">Colormap</a>: Methods to deal with image colormaps</li> -<li><a class="reference external" href="compare.html">Compare</a>: Compare images</li> -<li><a class="reference external" href="composite.html">Composite</a>: Composite images</li> -<li><a class="reference external" href="confirm_access.html">Confirm Access</a> : Confirm access to files and URLs.</li> -<li><a class="reference external" href="constitute.html">Constitute</a>: Read, write, import, and export images</li> -<li><a class="reference external" href="decorate.html">Decorate</a>: Add fancy borders to images</li> -<li><a class="reference external" href="describe.html">Describe</a>: Describe an image</li> -<li><a class="reference external" href="display.html">Display</a>: Interactively display and edit an image</li> -<li><a class="reference external" href="draw.html">Draw</a>: Convenient methods to draw vectors and text</li> -<li><a class="reference external" href="effect.html">Effect</a>:Threshold (various), blur, despeckle, edge, emboss, enhance, -gaussian blur ...</li> -<li><a class="reference external" href="enhance.html">Enhance</a>: Contrast, equalize, gamma, level, level channel, modulate, negate, -and normalize</li> -<li><a class="reference external" href="error.html">Error</a>: Error reporting methods</li> -<li><a class="reference external" href="export.html">Export</a> : Export image pixels to common representations</li> -<li><a class="reference external" href="fx.html">FX</a>: Special effects methods</li> -<li><a class="reference external" href="hclut.html">Hald CLUT</a> : Apply Hald CLUT to image</li> -<li><a class="reference external" href="image.html">Image</a>: Miscellaneous image methods</li> -<li><a class="reference external" href="import.html">Import</a> : Import image pixels from common representations</li> -<li><a class="reference external" href="list.html">List</a>: Manage image lists</li> -<li><a class="reference external" href="log.html">Log</a>: Event logging support</li> -<li><a class="reference external" href="magick.html">Magick</a>: Image format support interfaces</li> -<li><a class="reference external" href="memory.html">Memory</a>: Memory allocation methods</li> -<li><a class="reference external" href="monitor.html">Monitor</a>: Progress monitor callbacks</li> -<li><a class="reference external" href="montage.html">Montage</a>: Create a montage of image thumbnails</li> -<li><a class="reference external" href="operator.html">Operator</a>: Methods to apply mathematic or boolean operators to pixels</li> -<li><a class="reference external" href="paint.html">Paint</a>: Fill pixel regions</li> -<li><a class="reference external" href="pixel_cache.html">Pixel Cache</a>: Low-level access to image pixels</li> -<li><a class="reference external" href="pixel_iterator.html">Pixel Iterator</a>: Pixel iterator design pattern support functions</li> -<li><a class="reference external" href="plasma.html">Plasma</a>: Plasma fractal image generator</li> -<li><a class="reference external" href="profile.html">Profile</a>: Attached profile access</li> -<li><a class="reference external" href="quantize.html">Quantize</a>: Reduce image colors or assign image colors from colormap</li> -<li><a class="reference external" href="registry.html">Registry</a>: Store and retrieve images in memory by ID</li> -<li><a class="reference external" href="render.html">Render</a>: Render vector graphics</li> -<li><a class="reference external" href="resize.html">Resize</a>: Resize an Image</li> -<li><a class="reference external" href="resource.html">Resource</a>: Set and get resource limits</li> -<li><a class="reference external" href="segment.html">Segment</a>: Coalese similar image colors</li> -<li><a class="reference external" href="shear.html">Shear</a>: Rotate image, shear image, or apply a 2D affine transformation</li> -<li><a class="reference external" href="signature.html">Signature</a>: Compute an image signature (checksum)</li> -<li><a class="reference external" href="statistics.html">Statistics</a>: Compute image statistics</li> -<li><a class="reference external" href="texture.html">Texture</a>: Create a tiled texture image or tile an image with a texture.</li> -<li><a class="reference external" href="transform.html">Transform</a>: Chop, coalesce, deconstruct, flatten, flip, flop, mosiac, roll, -or shave image</li> +<li><p><a class="reference external" href="animate.html">Animate</a>: Interactively animate an image sequence</p></li> +<li><p><a class="reference external" href="annotate.html">Annotate</a>: Annotate an image with text</p></li> +<li><p><a class="reference external" href="attribute.html">Attribute</a>: Access key, value image attributes</p></li> +<li><p><a class="reference external" href="average.html">Average</a>: Average several images together</p></li> +<li><p><a class="reference external" href="cdl.html">ASC CDL</a> : Apply ASC CDL to image</p></li> +<li><p><a class="reference external" href="blob.html">Blob</a>: Read and write images to memory</p></li> +<li><p><a class="reference external" href="channel.html">Channel</a>: Import and export image channels as well as compute channel depth</p></li> +<li><p><a class="reference external" href="color.html">Color</a>: Methods to deal with image colors</p></li> +<li><p><a class="reference external" href="colormap.html">Colormap</a>: Methods to deal with image colormaps</p></li> +<li><p><a class="reference external" href="compare.html">Compare</a>: Compare images</p></li> +<li><p><a class="reference external" href="composite.html">Composite</a>: Composite images</p></li> +<li><p><a class="reference external" href="confirm_access.html">Confirm Access</a> : Confirm access to files and URLs.</p></li> +<li><p><a class="reference external" href="constitute.html">Constitute</a>: Read, write, import, and export images</p></li> +<li><p><a class="reference external" href="decorate.html">Decorate</a>: Add fancy borders to images</p></li> +<li><p><a class="reference external" href="describe.html">Describe</a>: Describe an image</p></li> +<li><p><a class="reference external" href="display.html">Display</a>: Interactively display and edit an image</p></li> +<li><p><a class="reference external" href="draw.html">Draw</a>: Convenient methods to draw vectors and text</p></li> +<li><p><a class="reference external" href="effect.html">Effect</a>:Threshold (various), blur, despeckle, edge, emboss, enhance, +gaussian blur ...</p></li> +<li><p><a class="reference external" href="enhance.html">Enhance</a>: Contrast, equalize, gamma, level, level channel, modulate, negate, +and normalize</p></li> +<li><p><a class="reference external" href="error.html">Error</a>: Error reporting methods</p></li> +<li><p><a class="reference external" href="export.html">Export</a> : Export image pixels to common representations</p></li> +<li><p><a class="reference external" href="fx.html">FX</a>: Special effects methods</p></li> +<li><p><a class="reference external" href="hclut.html">Hald CLUT</a> : Apply Hald CLUT to image</p></li> +<li><p><a class="reference external" href="image.html">Image</a>: Miscellaneous image methods</p></li> +<li><p><a class="reference external" href="import.html">Import</a> : Import image pixels from common representations</p></li> +<li><p><a class="reference external" href="list.html">List</a>: Manage image lists</p></li> +<li><p><a class="reference external" href="log.html">Log</a>: Event logging support</p></li> +<li><p><a class="reference external" href="magick.html">Magick</a>: Image format support interfaces</p></li> +<li><p><a class="reference external" href="memory.html">Memory</a>: Memory allocation methods</p></li> +<li><p><a class="reference external" href="monitor.html">Monitor</a>: Progress monitor callbacks</p></li> +<li><p><a class="reference external" href="montage.html">Montage</a>: Create a montage of image thumbnails</p></li> +<li><p><a class="reference external" href="operator.html">Operator</a>: Methods to apply mathematic or boolean operators to pixels</p></li> +<li><p><a class="reference external" href="paint.html">Paint</a>: Fill pixel regions</p></li> +<li><p><a class="reference external" href="pixel_cache.html">Pixel Cache</a>: Low-level access to image pixels</p></li> +<li><p><a class="reference external" href="pixel_iterator.html">Pixel Iterator</a>: Pixel iterator design pattern support functions</p></li> +<li><p><a class="reference external" href="plasma.html">Plasma</a>: Plasma fractal image generator</p></li> +<li><p><a class="reference external" href="profile.html">Profile</a>: Attached profile access</p></li> +<li><p><a class="reference external" href="quantize.html">Quantize</a>: Reduce image colors or assign image colors from colormap</p></li> +<li><p><a class="reference external" href="registry.html">Registry</a>: Store and retrieve images in memory by ID</p></li> +<li><p><a class="reference external" href="render.html">Render</a>: Render vector graphics</p></li> +<li><p><a class="reference external" href="resize.html">Resize</a>: Resize an Image</p></li> +<li><p><a class="reference external" href="resource.html">Resource</a>: Set and get resource limits</p></li> +<li><p><a class="reference external" href="segment.html">Segment</a>: Coalese similar image colors</p></li> +<li><p><a class="reference external" href="shear.html">Shear</a>: Rotate image, shear image, or apply a 2D affine transformation</p></li> +<li><p><a class="reference external" href="signature.html">Signature</a>: Compute an image signature (checksum)</p></li> +<li><p><a class="reference external" href="statistics.html">Statistics</a>: Compute image statistics</p></li> +<li><p><a class="reference external" href="texture.html">Texture</a>: Create a tiled texture image or tile an image with a texture.</p></li> +<li><p><a class="reference external" href="transform.html">Transform</a>: Chop, coalesce, deconstruct, flatten, flip, flop, mosiac, roll, +or shave image</p></li> </ul> </blockquote> <p>Here are a few sample programs to get you started.</p> <p>This example program (convert.c) simply converts from one file name to another (and will automatically change formats based on file extension):</p> -<pre class="literal-block"> -#include <stdio.h> +<pre class="literal-block">#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> @@ -176,13 +178,11 @@ int main ( int argc, char **argv ) DestroyMagick(); return exit_status; -} -</pre> +}</pre> <p>This example program (demo.c) which reads multiple input files (possibly animation files) specified on the command line, resizes the image frames to 106x80, and writes the resulting animation to disk:</p> -<pre class="literal-block"> -#include <stdio.h> +<pre class="literal-block">#include <stdio.h> #include <string.h> #include <time.h> #include <sys/types.h> @@ -265,17 +265,12 @@ int main(int argc,char **argv) DestroyExceptionInfo(&exception); DestroyMagick(); return(0); -} -</pre> +}</pre> <p>To compile on Unix, the command would look something like this:</p> -<pre class="literal-block"> -gcc -o demo demo.c -O `GraphicsMagick-config --cppflags --ldflags --libs` -</pre> +<pre class="literal-block">gcc -o demo demo.c -O `GraphicsMagick-config --cppflags --ldflags --libs`</pre> <p>As a usage example, with the input files in1.gif, in2.png, and in3.jpg, create the animation file out.miff:</p> -<pre class="literal-block"> -demo in1.gif in2.png in3.jpg out.miff -</pre> +<pre class="literal-block">demo in1.gif in2.png in3.jpg out.miff</pre> <p>The resulting animation may be played on an X11 display using 'gm animate out.miff'.</p> <p>The GraphicsMagick-config script reproduces the options which were used to @@ -283,9 +278,12 @@ compile the GraphicsMagick utilities. Using compatible options ensures that your program will compile and run.</p> </div> + <hr class="docutils"> <div class="document"> - <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2022<!--SPONSOR_LOGO--></p> + <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2023<!--SPONSOR_LOGO--></p> +</div> + </div> </body> </html> |