config root man

Current Path : /usr/local/share/doc/ImageMagick/www/api/MagickWand/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/share/doc/ImageMagick/www/api/MagickWand/mogrify-private_8h-source.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MagickWand: mogrify-private.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.4 -->
<div class="nav">
<a class="el" href="dir_101f7ac0a894e32543a314e85b2e1524.html">wand</a></div>
<h1>mogrify-private.h</h1><a href="mogrify-private_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization</span>
<a name="l00003"></a>00003 <span class="comment">  dedicated to making software imaging solutions freely available.</span>
<a name="l00004"></a>00004 <span class="comment">  </span>
<a name="l00005"></a>00005 <span class="comment">  You may not use this file except in compliance with the License.</span>
<a name="l00006"></a>00006 <span class="comment">  obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment">  </span>
<a name="l00008"></a>00008 <span class="comment">    http://www.imagemagick.org/script/license.php</span>
<a name="l00009"></a>00009 <span class="comment">  </span>
<a name="l00010"></a>00010 <span class="comment">  Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment">  distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00012"></a>00012 <span class="comment">  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment">  See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment">  limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">  MagickWand mogrify command-line private methods.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef _MAGICKWAND_MOGRIFY_PRIVATE_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define _MAGICKWAND_MOGRIFY_PRIVATE_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#if defined(__cplusplus) || defined(c_plusplus)</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a><a class="code" href="mogrify-private_8h.html#f634fa2085cd7aa0951c24caac4cc027">00025</a> <span class="preprocessor">#define MaxImageStackDepth  32</span>
<a name="l00026"></a><a class="code" href="mogrify-private_8h.html#402285aa04285b23a1c13035cf5e6eef">00026</a> <span class="preprocessor"></span><span class="preprocessor">#define MogrifyImageStack(image,advance,fire) \</span>
<a name="l00027"></a>00027 <span class="preprocessor">  if ((j &lt;= i) &amp;&amp; (i &lt; argc)) \</span>
<a name="l00028"></a>00028 <span class="preprocessor">    { \</span>
<a name="l00029"></a>00029 <span class="preprocessor">      if ((image) == (Image *) NULL) \</span>
<a name="l00030"></a>00030 <span class="preprocessor">        status&amp;=MogrifyImageInfo(image_info,(int) (i-j+1),(const char **) \</span>
<a name="l00031"></a>00031 <span class="preprocessor">          argv+j,exception); \</span>
<a name="l00032"></a>00032 <span class="preprocessor">      else \</span>
<a name="l00033"></a>00033 <span class="preprocessor">        if ((fire) != MagickFalse) \</span>
<a name="l00034"></a>00034 <span class="preprocessor">          { \</span>
<a name="l00035"></a>00035 <span class="preprocessor">            status&amp;=MogrifyImages(image_info,(int) (i-j+1),(const char **) \</span>
<a name="l00036"></a>00036 <span class="preprocessor">              argv+j,&amp;(image),exception); \</span>
<a name="l00037"></a>00037 <span class="preprocessor">            if ((advance) != MagickFalse) \</span>
<a name="l00038"></a>00038 <span class="preprocessor">              j=i+1; \</span>
<a name="l00039"></a>00039 <span class="preprocessor">            pend=MagickFalse; \</span>
<a name="l00040"></a>00040 <span class="preprocessor">          } \</span>
<a name="l00041"></a>00041 <span class="preprocessor">    }</span>
<a name="l00042"></a><a class="code" href="mogrify-private_8h.html#4b45917df9c2dd996220e6da5b4afa80">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define DegreesToRadians(x)  (MagickPI*(x)/180.0)</span>
<a name="l00043"></a><a class="code" href="mogrify-private_8h.html#dddca64c32cd95a435965636f812fbde">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define MagickPI  3.14159265358979323846264338327950288419716939937510</span>
<a name="l00044"></a><a class="code" href="mogrify-private_8h.html#eee7d297e9e3733c9e3b34594c582afe">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define QuantumScale  ((MagickRealType) 1.0/(MagickRealType) QuantumRange)</span>
<a name="l00045"></a><a class="code" href="mogrify-private_8h.html#5328dab476e2451ad74be94740a8f71a">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define QuantumTick(i,span) ((MagickBooleanType) ((((i) &amp; ((i)-1)) == 0) || \</span>
<a name="l00046"></a>00046 <span class="preprocessor">   (((i) &amp; 0xfff) == 0) || \</span>
<a name="l00047"></a>00047 <span class="preprocessor">   ((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1))))</span>
<a name="l00048"></a><a class="code" href="mogrify-private_8h.html#ee673359f8d2f4b696a214f8d0bc9c97">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define RadiansToDegrees(x) (180.0*(x)/MagickPI)</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00050"></a><a class="code" href="mogrify-private_8h.html#0d9db86488677e269a93987caa630085">00050</a> <span class="keyword">static</span> <span class="keyword">inline</span> MagickRealType <a class="code" href="mogrify-private_8h.html#0d9db86488677e269a93987caa630085">MagickPixelIntensity</a>(
<a name="l00051"></a>00051   <span class="keyword">const</span> MagickPixelPacket *pixel)
<a name="l00052"></a>00052 {
<a name="l00053"></a>00053   MagickRealType
<a name="l00054"></a>00054     intensity;
<a name="l00055"></a>00055 
<a name="l00056"></a>00056   intensity=0.299*pixel-&gt;red+0.587*pixel-&gt;green+0.114*pixel-&gt;blue;
<a name="l00057"></a>00057   <span class="keywordflow">return</span>(intensity);
<a name="l00058"></a>00058 }
<a name="l00059"></a>00059 
<a name="l00060"></a><a class="code" href="mogrify-private_8h.html#a8c8c8fd29ad44047c489ae6947d3ae8">00060</a> <span class="keyword">static</span> <span class="keyword">inline</span> Quantum <a class="code" href="mogrify-private_8h.html#a8c8c8fd29ad44047c489ae6947d3ae8">MagickPixelIntensityToQuantum</a>(
<a name="l00061"></a>00061   <span class="keyword">const</span> MagickPixelPacket *pixel)
<a name="l00062"></a>00062 {
<a name="l00063"></a>00063   MagickRealType
<a name="l00064"></a>00064     intensity;
<a name="l00065"></a>00065 
<a name="l00066"></a>00066   intensity=0.299*pixel-&gt;red+0.587*pixel-&gt;green+0.114*pixel-&gt;blue;
<a name="l00067"></a>00067   <span class="keywordflow">return</span>((Quantum) (intensity+0.5));
<a name="l00068"></a>00068 }
<a name="l00069"></a>00069 
<a name="l00070"></a><a class="code" href="mogrify-private_8h.html#6512a2a5964e2b2db8eaadd4f70ba711">00070</a> <span class="keyword">static</span> <span class="keyword">inline</span> MagickRealType <a class="code" href="mogrify-private_8h.html#6512a2a5964e2b2db8eaadd4f70ba711">PixelIntensity</a>(<span class="keyword">const</span> PixelPacket *pixel)
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072   MagickRealType
<a name="l00073"></a>00073     intensity;
<a name="l00074"></a>00074 
<a name="l00075"></a>00075   intensity=(MagickRealType) (0.299*pixel-&gt;red+0.587*pixel-&gt;green+
<a name="l00076"></a>00076     0.114*pixel-&gt;blue);
<a name="l00077"></a>00077   <span class="keywordflow">return</span>(intensity);
<a name="l00078"></a>00078 }
<a name="l00079"></a>00079 
<a name="l00080"></a><a class="code" href="mogrify-private_8h.html#4450d645257ce4896b3ddfb611eab414">00080</a> <span class="keyword">static</span> <span class="keyword">inline</span> Quantum <a class="code" href="mogrify-private_8h.html#4450d645257ce4896b3ddfb611eab414">PixelIntensityToQuantum</a>(<span class="keyword">const</span> PixelPacket *pixel)
<a name="l00081"></a>00081 {
<a name="l00082"></a>00082   MagickRealType
<a name="l00083"></a>00083     intensity;
<a name="l00084"></a>00084 
<a name="l00085"></a>00085   intensity=(MagickRealType) (0.299*pixel-&gt;red+0.587*pixel-&gt;green+
<a name="l00086"></a>00086     0.114*pixel-&gt;blue);
<a name="l00087"></a>00087 <span class="preprocessor">#if !defined(MAGICKCORE_HDRI_SUPPORT)</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span>  <span class="keywordflow">return</span>((Quantum) (intensity+0.5));
<a name="l00089"></a>00089 <span class="preprocessor">#else</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span>  <span class="keywordflow">return</span>((Quantum) intensity);
<a name="l00091"></a>00091 <span class="preprocessor">#endif</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span>}
<a name="l00093"></a><a class="code" href="mogrify-private_8h.html#20a73fc8daa94573b90af1a202e08fef">00093</a> 
<a name="l00094"></a>00094 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="mogrify-private_8h.html#20a73fc8daa94573b90af1a202e08fef">SetMagickPixelPacket</a>(<span class="keyword">const</span> Image *image,
<a name="l00095"></a>00095   <span class="keyword">const</span> PixelPacket *color,<span class="keyword">const</span> IndexPacket *index,MagickPixelPacket *pixel)
<a name="l00096"></a>00096 {
<a name="l00097"></a>00097   pixel-&gt;red=(MagickRealType) color-&gt;red;
<a name="l00098"></a>00098   pixel-&gt;green=(MagickRealType) color-&gt;green;
<a name="l00099"></a>00099   pixel-&gt;blue=(MagickRealType) color-&gt;blue;
<a name="l00100"></a>00100   if (image-&gt;matte != MagickFalse)
<a name="l00101"></a>00101     pixel-&gt;opacity=(MagickRealType) color-&gt;opacity;
<a name="l00102"></a>00102   if (((image-&gt;colorspace == CMYKColorspace) ||
<a name="l00103"></a>00103        (image-&gt;storage_class == PseudoClass)) &amp;&amp;
<a name="l00104"></a>00104       (index != (<span class="keyword">const</span> IndexPacket *) NULL))
<a name="l00105"></a>00105     pixel-&gt;index=(MagickRealType) *index;
<a name="l00106"></a>00106 }
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="preprocessor">#if defined(__cplusplus) || defined(c_plusplus)</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span>}
<a name="l00110"></a>00110 <span class="preprocessor">#endif</span>
<a name="l00111"></a>00111 <span class="preprocessor"></span>
<a name="l00112"></a>00112 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 26 14:50:34 2008 for MagickWand by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>

Man Man