]> granicus.if.org Git - imagemagick/blobdiff - www/magick-core.html
(no commit message)
[imagemagick] / www / magick-core.html
index 58ed97a96ecd9d77f7088fbee78c1570f40fec5d..f0e24735f092a6b15b2318ede1c58d72e8c59765 100644 (file)
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
   <meta name="Application-name" content="ImageMagick"/>
-  <meta name="Description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition resize, rotate, shear, distort and transform images."/>
+  <meta name="Description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition resize, rotate, shear, distort and transform images automagically."/>
   <meta name="Application-url" content="http://www.imagemagick.org"/>
   <meta name="Generator" content="PHP"/>
-  <meta name="Keywords" content="magickcore, low-level, c, api, for, imagemagick, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
+  <meta name="Keywords" content="magickcore, low-level, c, api, for, imagemagick, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Image, Processing, Automagically"/>
   <meta name="Rating" content="GENERAL"/>
   <meta name="Robots" content="INDEX, FOLLOW"/>
   <meta name="Generator" content="ImageMagick Studio LLC"/>
 \r
 <body id="www-imagemagick-org">\r
 <div class="titlebar">\r
-<a href="../index.html">\r
-  <img src="../images/script.png" alt="[ImageMagick]"\r
-  style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>\r
-<a href="http://www.networkredux.com">\r
-  <img src="../images/networkredux.png" alt="[sponsor]"\r
-  style="margin-top: 42px; border: 0px; float: left;" /></a>\r
+<div style="margin: 17px auto; float: left;">\r
+  <script type="text/javascript">\r
+  <!--\r
+    google_ad_client = "pub-3129977114552745";\r
+    google_ad_slot = "5439289906";\r
+    google_ad_width = 728;\r
+    google_ad_height = 90;\r
+  //-->\r
+  </script>\r
+  <script type="text/javascript"\r
+    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
+  </script>\r
+</div>\r
 <a href="http://www.imagemagick.org/discourse-server/">\r
   <img src="../images/logo.jpg"\r
   alt="ImageMagick Logo"\r
@@ -82,7 +89,7 @@
     <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
 </div>
 <div class="sub">
-    <a title="Binary Release: iPhone" href="../www/binary-releases.html#iPhone">iPhone</a>
+    <a title="Binary Release: iOS" href="../www/binary-releases.html#iOS">iOS</a>
 </div>
 <div class="sub">
     <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
 </div>
 <div class="sep"></div>\r
 <div  class="menu">
-  <a title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
+  <a rel="follow" title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
 
+<a href="http://www.networkredux.com">
+  <img src="../images/networkredux.png" alt="[sponsor]"
+  style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a>
 <div class="sponsbox">
 <div  class="sponsor">
-  <a title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
+  <a rel="follow" title="Sponsor: Web Hosting" href="http://www.micfo.com">Web Hosting</a><!-- 209901010090s golestan -->
+</div>
+<div  class="sponsor">
+  <a rel="follow" title="Sponsor: Search engine optimisation" href="http://www.seomoves.com.au">Search engine optimisation</a><!-- 201110010090s jen@seo lowprofilelinks -->
+</div>
+<div  class="sponsor">
+  <a rel="follow" title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
+</div>
+<div  class="sponsor">
+  <a rel="follow" title="Sponsor: Web Hosting Deals" href="http://www.webhostingdeals.org">Web Hosting Deals</a><!-- 201111010270 chee.hoa darin -->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
+  <a rel="follow" title="Sponsor: Web Hosting Reviews" href="http://www.webhostingsecretrevealed.com">Web Hosting Secret Revealed</a><!-- 201204010540 iamchee jerry -->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201107010240 r.leo -->
+  <a rel="follow" title="Sponsor: Web Hosting Break" href="http://www.webhostingbreak.com">Web Hosting Break</a><!-- 201109010090 ian@ian-m... -->
 </div>
-<div class="sponsor">
-  <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.shtml">Web Hosting</a><!-- 201104010090 -->
+<div  class="sponsor">
+  <a rel="follow" title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
+</div>
+<div  class="sponsor">
+  <a rel="follow" title="Sponsor: Website Hosting" href="http://www.hostreviewgeeks.com">Website Hosting</a><!-- 201110010090 alexanian media -->
+</div>
+<div  class="sponsor">
+  <a rel="follow" title="Sponsor: Hotel München" href="http://www.messehotel-erb-muenchen.de">Hotel München</a><!-- 201111010450 cerb -->
+</div>
+<div  class="sponsor">
+  <a rel="follow" title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
+  <a rel="follow" title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
+  <a rel="follow" title="Sponsor: Web Hosting Reviews" href="http://www.webhostingmasters.com">Web Hosting Reviews</a><!-- 201107011500 affliatelabel -->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
+  <a rel="follow" title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
 </div>
 <div  class="sponsor">
-   <a title="Sponsor: Custom T-Shirts" href="http://www.ooshirts.com">Custom T-Shirts</a><!-- 2011050100030 ooshirts.com-->
+   <a rel="follow" title="Sponsor: Bildbearbeitung" href="http://www.bildschliff.de">Bildbearbeitung</a><!-- 2012060100300 strait.de-->
 </div>
 </div>
 </div>
 </div>\r
 \r
 <div class="eastbar">\r
-  <script type="text/javascript">\r
-  <!--\r
-    google_ad_client = "pub-3129977114552745";\r
-    google_ad_slot = "0574824969";\r
-    google_ad_width = 160;\r
-    google_ad_height = 600;\r
-  //-->\r
-  </script>\r
-  <script type="text/javascript"\r
-    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-  </script>\r
+\r
 </div>\r
 \r
 <div class="main">\r
 <p>Here is a example program that utilizes the MagickCore API to get you started, <a href="../www/source/core.c">core.c</a>. It reads a GIF image, creates a thumbnail, and writes it to disk in the PNG image format.</p>
 
 <div class="viewport">
-<pre class="code">
   #include &lt;stdio.h>
   #include &lt;stdlib.h>
   #include &lt;string.h>
     MagickCoreTerminus();
     return(0);
   }
-</pre>
 </div>
 <p><a id="image-view"></a>Now lets perform the same contrast enhancement while taking advantage of our dual or quad-core processing system by running the algorithm in parallel utilizing wand views.  The <a href="../www/source/core/sigmoidal-contrast.c">sigmoidal-contrast.c</a> module reads an image, applies sigmoidal non-linearity contrast control, and writes the result to disk just like the previous contrast enhancement program, but now it does its work in parallel (assumes ImageMagick is built with OpenMP support).</p>
 
 <div class="viewport">
-<pre class="code">
 #include &lt;stdio.h>
 #include &lt;stdlib.h>
 #include &lt;math.h>
@@ -356,15 +371,21 @@ static MagickBooleanType SigmoidalContrast(ImageView *contrast_view,
   pixels=GetImageViewAuthenticPixels(contrast_view);
   for (x=0; x &lt; (ssize_t) (extent.width-extent.x); x++)
   {
-    pixels[x].red=RoundToQuantum(SigmoidalContrast(pixels[x].red));
-    pixels[x].green=RoundToQuantum(SigmoidalContrast(pixels[x].green));
-    pixels[x].blue=RoundToQuantum(SigmoidalContrast(pixels[x].blue));
-    pixels[x].opacity=RoundToQuantum(SigmoidalContrast(pixels[x].opacity));
+    SetRedPixelComponent(pixels,RoundToQuantum(SigmoidalContrast(
+      GetRedPixelComponent(pixels)));
+    SetGreenPixelComponent(pixels,RoundToQuantum(SigmoidalContrast(
+      GetGreenPixelComponent(pixels)));
+    SetBluePixelComponent(pixels,RoundToQuantum(SigmoidalContrast(
+      GetBluePixelComponent(pixels)));
+    SetOpacityPixelComponent(pixels,RoundToQuantum(SigmoidalContrast(
+      GetOpacityPixelComponent(pixels)));
+    pixels++;
   }
   indexes=GetImageViewAuthenticIndexes(contrast_view);
   if (indexes != (IndexPacket *) NULL)
     for (x=0; x &lt; (ssize_t) (extent.width-extent.x); x++)
-      indexes[x]=(IndexPacket) RoundToQuantum(SigmoidalContrast(indexes[x]));
+      SetIndexPixelComponent(indexes+x,RoundToQuantum(SigmoidalContrast(
+        GetIndexPixelComponent(indexes+x))));
   return(MagickTrue);
 }
 
@@ -444,7 +465,6 @@ int main(int argc,char **argv)
   MagickCoreTerminus();
   return(0);
 }
-</pre>
 </div>
 </div>
 \r