pixel.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007   
00008     https://imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore image constitute methods.
00017 */
00018 #ifndef MAGICKCORE_PIXEL_H
00019 #define MAGICKCORE_PIXEL_H
00020 
00021 #include "magick/colorspace.h"
00022 #include "magick/constitute.h"
00023 
00024 #if defined(__cplusplus) || defined(c_plusplus)
00025 extern "C" {
00026 #endif
00027 
00028 /*
00029   Pixel enum declarations.
00030 */
00031 typedef enum
00032 {
00033   UndefinedInterpolatePixel,
00034   AverageInterpolatePixel,           /* Average 4 nearest neighbours */
00035   BicubicInterpolatePixel,           /* Catmull-Rom interpolation */
00036   BilinearInterpolatePixel,          /* Triangular filter interpolation */
00037   FilterInterpolatePixel,            /* Use resize filter - (very slow) */
00038   IntegerInterpolatePixel,           /* Integer (floor) interpolation */
00039   MeshInterpolatePixel,              /* Triangular mesh interpolation */
00040   NearestNeighborInterpolatePixel,   /* Nearest neighbour only */
00041   SplineInterpolatePixel,            /* Cubic Spline (blurred) interpolation */
00042   Average9InterpolatePixel,          /* Average 9 nearest neighbours */
00043   Average16InterpolatePixel,         /* Average 16 nearest neighbours */
00044   BlendInterpolatePixel,             /* blend of nearest 1, 2 or 4 pixels */
00045   BackgroundInterpolatePixel,        /* just return background color */
00046   CatromInterpolatePixel             /* Catmull-Rom interpolation */
00047 } InterpolatePixelMethod;
00048 
00049 typedef enum
00050 {
00051   PixelRed = 0,
00052   PixelCyan = 0,
00053   PixelGray = 0,
00054   PixelY = 0,
00055   PixelGreen = 1,
00056   PixelMagenta = 1,
00057   PixelCb = 1,
00058   PixelBlue = 2,
00059   PixelYellow = 2,
00060   PixelCr = 2,
00061   PixelAlpha = 3,
00062   PixelBlack = 4,
00063   PixelIndex = 4,
00064   MaskPixelComponent = 5
00065 } PixelComponent;
00066 
00067 typedef enum
00068 {
00069   UndefinedPixelIntensityMethod = 0,
00070   AveragePixelIntensityMethod,
00071   BrightnessPixelIntensityMethod,
00072   LightnessPixelIntensityMethod,
00073   Rec601LumaPixelIntensityMethod,
00074   Rec601LuminancePixelIntensityMethod,
00075   Rec709LumaPixelIntensityMethod,
00076   Rec709LuminancePixelIntensityMethod,
00077   RMSPixelIntensityMethod,
00078   MSPixelIntensityMethod
00079 } PixelIntensityMethod;
00080 
00081 /*
00082   Pixel typedef declarations.
00083 */
00084 typedef struct _DoublePixelPacket
00085 {
00086   double
00087     red,
00088     green,
00089     blue,
00090     opacity,
00091     index;
00092 } DoublePixelPacket;
00093 
00094 typedef struct _LongPixelPacket
00095 {
00096   unsigned int
00097     red,
00098     green,
00099     blue,
00100     opacity,
00101     index;
00102 } LongPixelPacket;
00103 
00104 typedef struct _MagickPixelPacket
00105 {
00106   ClassType
00107     storage_class;
00108 
00109   ColorspaceType
00110     colorspace;
00111 
00112   MagickBooleanType
00113     matte;
00114 
00115   double
00116     fuzz;
00117 
00118   size_t
00119     depth;
00120 
00121   MagickRealType
00122     red,
00123     green,
00124     blue,
00125     opacity,
00126     index;
00127 } MagickPixelPacket;
00128 
00129 typedef Quantum IndexPacket;
00130 
00131 typedef struct _PixelPacket
00132 {
00133 #if defined(MAGICKCORE_WORDS_BIGENDIAN)
00134 #define MAGICK_PIXEL_RGBA  1
00135   Quantum
00136     red,
00137     green,
00138     blue,
00139     opacity;
00140 #else
00141 #define MAGICK_PIXEL_BGRA  1
00142   Quantum
00143     blue,
00144     green,
00145     red,
00146     opacity;
00147 #endif
00148 } PixelPacket;
00149 
00150 typedef struct _QuantumPixelPacket
00151 {
00152   Quantum
00153     red,
00154     green,
00155     blue,
00156     opacity,
00157     index;
00158 } QuantumPixelPacket;
00159 
00160 typedef struct _CacheView
00161   CacheView_;
00162 
00163 /*
00164   Pixel method declarations.
00165 */
00166 extern MagickExport MagickBooleanType
00167   ExportImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
00168     const size_t,const char *,const StorageType,void *,ExceptionInfo *),
00169   ImportImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
00170     const size_t,const char *,const StorageType,const void *),
00171   InterpolateMagickPixelPacket(const Image *magick_restrict,const CacheView_ *,
00172     const InterpolatePixelMethod,const double,const double,MagickPixelPacket *,
00173     ExceptionInfo *);
00174 
00175 extern MagickExport MagickPixelPacket
00176   *CloneMagickPixelPacket(const MagickPixelPacket *);
00177 
00178 extern MagickExport MagickRealType
00179   DecodePixelGamma(const MagickRealType) magick_hot_spot,
00180   EncodePixelGamma(const MagickRealType) magick_hot_spot,
00181   GetMagickPixelIntensity(const Image *image,
00182     const MagickPixelPacket *magick_restrict) magick_hot_spot,
00183   GetPixelIntensity(const Image *image,const PixelPacket *magick_restrict)
00184     magick_hot_spot;
00185 
00186 extern MagickExport void
00187   ConformMagickPixelPacket(Image *,const MagickPixelPacket *,
00188     MagickPixelPacket *,ExceptionInfo *),
00189   GetMagickPixelPacket(const Image *,MagickPixelPacket *);
00190 
00191 #if defined(__cplusplus) || defined(c_plusplus)
00192 }
00193 #endif
00194 
00195 #endif

Generated on 2 Jul 2019 for MagickCore by  doxygen 1.6.1