Current Path : /usr/local/share/doc/ImageMagick/www/api/MagickCore/ |
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 |
Current File : //usr/local/share/doc/ImageMagick/www/api/MagickCore/image-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>MagickCore: image-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_b44b349db36f8365f5234e57d3038770.html">magick</a></div> <h1>image-private.h</h1><a href="image-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"> MagickCore image private methods.</span> <a name="l00017"></a>00017 <span class="comment">*/</span> <a name="l00018"></a>00018 <span class="preprocessor">#ifndef _MAGICKCORE_IMAGE_PRIVATE_H</span> <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define _MAGICKCORE_IMAGE_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="image-private_8h.html#dddca64c32cd95a435965636f812fbde">00025</a> <span class="preprocessor">#define MagickPI 3.14159265358979323846264338327950288419716939937510</span> <a name="l00026"></a><a class="code" href="image-private_8h.html#07172cdc525063d2084877b506c4cde6">00026</a> <span class="preprocessor"></span><span class="preprocessor">#define MagickSQ1_2 0.7071067811865475244008443621048490</span> <a name="l00027"></a><a class="code" href="image-private_8h.html#cb68cfbfccbf406d47761fefac32474b">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define MagickSQ2PI 2.50662827463100024161235523934010416269302368164062</span> <a name="l00028"></a><a class="code" href="image-private_8h.html#eee7d297e9e3733c9e3b34594c582afe">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define QuantumScale ((double) 1.0/(double) QuantumRange)</span> <a name="l00029"></a><a class="code" href="image-private_8h.html#9e7ece947c31a81a0160975e6e815923">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define UndefinedTicksPerSecond 100L</span> <a name="l00030"></a><a class="code" href="image-private_8h.html#9f77683334df924a316246ae901685e5">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define UndefinedCompressionQuality 0UL</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 <span class="keyword">extern</span> <a class="code" href="MagickCore_8h.html#487cee8f0dff0607e77f6b51d6403651">MagickExport</a> <span class="keyword">const</span> <span class="keywordtype">char</span> <a name="l00033"></a>00033 *<a class="code" href="image-private_8h.html#1a34634e3df42a1df4a1131ad2267301">BackgroundColor</a>, <a name="l00034"></a>00034 *<a class="code" href="image-private_8h.html#f38afe090ef218ec56e0aabbd9b9a601">BorderColor</a>, <a name="l00035"></a>00035 *<a class="code" href="image-private_8h.html#7ea7a1176592e8a7f34a2e928f259559">DefaultTileFrame</a>, <a name="l00036"></a>00036 *<a class="code" href="image-private_8h.html#e58b84a1e18e0c8c9592e3fc1e262d03">DefaultTileGeometry</a>, <a name="l00037"></a>00037 *<a class="code" href="image-private_8h.html#c681bdc306c269f50de8d626deb11fbe">DefaultTileLabel</a>, <a name="l00038"></a>00038 *<a class="code" href="image-private_8h.html#f464a2099ea36366171cd478f9ddd814">ForegroundColor</a>, <a name="l00039"></a>00039 *<a class="code" href="image-private_8h.html#36d3d285e792956b9298be509ef07c2d">MatteColor</a>, <a name="l00040"></a>00040 *<a class="code" href="image-private_8h.html#d9769f2ddf848b38662b84897ef61660">LoadImageTag</a>, <a name="l00041"></a>00041 *<a class="code" href="image-private_8h.html#2da0ebab764abe526f21b1babcb043c8">LoadImagesTag</a>, <a name="l00042"></a>00042 *<a class="code" href="image-private_8h.html#2dfe14ea4344b05639a90bf0e2d87666">PSDensityGeometry</a>, <a name="l00043"></a>00043 *<a class="code" href="image-private_8h.html#e9d440c7dda92de9ab361860d42f086b">PSPageGeometry</a>, <a name="l00044"></a>00044 *<a class="code" href="image-private_8h.html#74f31e3e3afdce4e54a091c8d95985fc">SaveImageTag</a>, <a name="l00045"></a>00045 *<a class="code" href="image-private_8h.html#5f669ccaddfd7374590bb4436df8223b">SaveImagesTag</a>; <a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="keyword">extern</span> <a class="code" href="MagickCore_8h.html#487cee8f0dff0607e77f6b51d6403651">MagickExport</a> <span class="keyword">const</span> <span class="keywordtype">double</span> <a name="l00048"></a>00048 <a class="code" href="image-private_8h.html#07ece5535270a3fc5c10c3482a43b9c0">DefaultResolution</a>; <a name="l00049"></a>00049 <a name="l00050"></a><a class="code" href="image-private_8h.html#ab284df5943a88c5a906e5d215247126">00050</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="image-private_8h.html#ab284df5943a88c5a906e5d215247126">DegreesToRadians</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> degrees) <a name="l00051"></a>00051 { <a name="l00052"></a>00052 <span class="keywordflow">return</span>(<a class="code" href="image-private_8h.html#dddca64c32cd95a435965636f812fbde">MagickPI</a>*degrees/180.0); <a name="l00053"></a>00053 } <a name="l00054"></a>00054 <a name="l00055"></a><a class="code" href="image-private_8h.html#8c612e78eac1302f25122a73463eff0c">00055</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="magick-type_8h.html#c740cbce6e8928a679ae3767b49428dd">MagickBooleanType</a> <a class="code" href="image-private_8h.html#8c612e78eac1302f25122a73463eff0c">QuantumTick</a>(<span class="keyword">const</span> <a class="code" href="magick-type_8h.html#f33a57dd4983c12f458d5e979a30298d">MagickOffsetType</a> offset, <a name="l00056"></a>00056 <span class="keyword">const</span> <a class="code" href="magick-type_8h.html#68dda12c0fc8e2522f47ac9be2de20b4">MagickSizeType</a> span) <a name="l00057"></a>00057 { <a name="l00058"></a>00058 <span class="keywordflow">if</span> ((offset & (offset-1)) == 0) <a name="l00059"></a>00059 <span class="keywordflow">return</span>(<a class="code" href="magick-type_8h.html#c740cbce6e8928a679ae3767b49428dd64dfe6c314e51d3d78da0554f5cce497">MagickTrue</a>); <a name="l00060"></a>00060 <span class="keywordflow">if</span> ((offset & 0x7f) == 0) <a name="l00061"></a>00061 <span class="keywordflow">return</span>(<a class="code" href="magick-type_8h.html#c740cbce6e8928a679ae3767b49428dd64dfe6c314e51d3d78da0554f5cce497">MagickTrue</a>); <a name="l00062"></a>00062 <span class="keywordflow">if</span> (offset == (<a class="code" href="magick-type_8h.html#f33a57dd4983c12f458d5e979a30298d">MagickOffsetType</a>) (span-1)) <a name="l00063"></a>00063 <span class="keywordflow">return</span>(<a class="code" href="magick-type_8h.html#c740cbce6e8928a679ae3767b49428dd64dfe6c314e51d3d78da0554f5cce497">MagickTrue</a>); <a name="l00064"></a>00064 <span class="keywordflow">return</span>(<a class="code" href="magick-type_8h.html#c740cbce6e8928a679ae3767b49428dd5c7243daf92cdb3082c79d702afcfffc">MagickFalse</a>); <a name="l00065"></a>00065 } <a name="l00066"></a>00066 <a name="l00067"></a><a class="code" href="image-private_8h.html#8d5a67979dcdd161a69edc8279fa4e57">00067</a> <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="magick-type_8h.html#63ab595ab40d99ff825a4c39cc69c074">MagickRealType</a> <a class="code" href="image-private_8h.html#8d5a67979dcdd161a69edc8279fa4e57">RadiansToDegrees</a>(<span class="keyword">const</span> <a class="code" href="magick-type_8h.html#63ab595ab40d99ff825a4c39cc69c074">MagickRealType</a> radians) <a name="l00068"></a>00068 { <a name="l00069"></a>00069 <span class="keywordflow">return</span>(180.0*radians/<a class="code" href="image-private_8h.html#dddca64c32cd95a435965636f812fbde">MagickPI</a>); <a name="l00070"></a>00070 } <a name="l00071"></a>00071 <a name="l00072"></a><a class="code" href="image-private_8h.html#1ec8368e06ea42d284a6d9a36658a142">00072</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="image-private_8h.html#1ec8368e06ea42d284a6d9a36658a142">ScaleColor5to8</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> color) <a name="l00073"></a>00073 { <a name="l00074"></a>00074 <span class="keywordflow">return</span>((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>) (((color) << 3) | ((color) >> 2))); <a name="l00075"></a>00075 } <a name="l00076"></a>00076 <a name="l00077"></a><a class="code" href="image-private_8h.html#20894c94cbbabe64dccef0b63e45fe2f">00077</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="image-private_8h.html#20894c94cbbabe64dccef0b63e45fe2f">ScaleColor6to8</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> color) <a name="l00078"></a>00078 { <a name="l00079"></a>00079 <span class="keywordflow">return</span>((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>) (((color) << 2) | ((color) >> 4))); <a name="l00080"></a>00080 } <a name="l00081"></a>00081 <a name="l00082"></a><a class="code" href="image-private_8h.html#c3bb7f909cf5170f7763a17c1af51c10">00082</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="image-private_8h.html#c3bb7f909cf5170f7763a17c1af51c10">ScaleColor8to5</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> color) <a name="l00083"></a>00083 { <a name="l00084"></a>00084 <span class="keywordflow">return</span>((<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>) (((color) & ~0x07) >> 3)); <a name="l00085"></a>00085 } <a name="l00086"></a>00086 <a name="l00087"></a><a class="code" href="image-private_8h.html#b8c176a6c59a1b0c2f588cdbea528c05">00087</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="image-private_8h.html#b8c176a6c59a1b0c2f588cdbea528c05">ScaleColor8to6</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> color) <a name="l00088"></a>00088 { <a name="l00089"></a>00089 <span class="keywordflow">return</span>((<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>) (((color) & ~0x03) >> 2)); <a name="l00090"></a>00090 } <a name="l00091"></a>00091 <a name="l00092"></a>00092 <span class="preprocessor">#if defined(__cplusplus) || defined(c_plusplus)</span> <a name="l00093"></a>00093 <span class="preprocessor"></span>} <a name="l00094"></a>00094 <span class="preprocessor">#endif</span> <a name="l00095"></a>00095 <span class="preprocessor"></span> <a name="l00096"></a>00096 <span class="preprocessor">#endif</span> </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 26 14:50:29 2008 for MagickCore by <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>