image.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 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 methods.
00017 */
00018 #ifndef MAGICKCORE_IMAGE_H
00019 #define MAGICKCORE_IMAGE_H
00020 
00021 #include "magick/color.h"
00022 
00023 #if defined(__cplusplus) || defined(c_plusplus)
00024 extern "C" {
00025 #endif
00026 
00027 #define OpaqueOpacity  ((Quantum) 0UL)
00028 #define TransparentOpacity  (QuantumRange)
00029 
00030 typedef enum
00031 {
00032   UndefinedAlphaChannel,
00033   ActivateAlphaChannel,
00034   BackgroundAlphaChannel,
00035   CopyAlphaChannel,
00036   DeactivateAlphaChannel,
00037   ExtractAlphaChannel,
00038   OpaqueAlphaChannel,
00039   ResetAlphaChannel,  /* deprecated */
00040   SetAlphaChannel,
00041   ShapeAlphaChannel,
00042   TransparentAlphaChannel,
00043   FlattenAlphaChannel,
00044   RemoveAlphaChannel,
00045   AssociateAlphaChannel,
00046   DisassociateAlphaChannel
00047 } AlphaChannelType;
00048 
00049 typedef enum
00050 {
00051   UndefinedType,
00052   BilevelType,
00053   GrayscaleType,
00054   GrayscaleMatteType,
00055   PaletteType,
00056   PaletteMatteType,
00057   TrueColorType,
00058   TrueColorMatteType,
00059   ColorSeparationType,
00060   ColorSeparationMatteType,
00061   OptimizeType,
00062   PaletteBilevelMatteType
00063 } ImageType;
00064 
00065 typedef enum
00066 {
00067   UndefinedInterlace,
00068   NoInterlace,
00069   LineInterlace,
00070   PlaneInterlace,
00071   PartitionInterlace,
00072   GIFInterlace,
00073   JPEGInterlace,
00074   PNGInterlace
00075 } InterlaceType;
00076 
00077 typedef enum
00078 {
00079   UndefinedOrientation,
00080   TopLeftOrientation,
00081   TopRightOrientation,
00082   BottomRightOrientation,
00083   BottomLeftOrientation,
00084   LeftTopOrientation,
00085   RightTopOrientation,
00086   RightBottomOrientation,
00087   LeftBottomOrientation
00088 } OrientationType;
00089 
00090 typedef enum
00091 {
00092   UndefinedResolution,
00093   PixelsPerInchResolution,
00094   PixelsPerCentimeterResolution
00095 } ResolutionType;
00096 
00097 typedef struct _PrimaryInfo
00098 {
00099   double
00100     x,
00101     y,
00102     z;
00103 } PrimaryInfo;
00104 
00105 typedef struct _SegmentInfo
00106 {
00107   double
00108     x1,
00109     y1,
00110     x2,
00111     y2;
00112 } SegmentInfo;
00113 
00114 typedef enum
00115 {
00116   UndefinedTransmitType,
00117   FileTransmitType,
00118   BlobTransmitType,
00119   StreamTransmitType,
00120   ImageTransmitType
00121 } TransmitType;
00122 
00123 typedef struct _ChromaticityInfo
00124 {
00125   PrimaryInfo
00126     red_primary,
00127     green_primary,
00128     blue_primary,
00129     white_point;
00130 } ChromaticityInfo;
00131 
00132 #include "magick/blob.h"
00133 #include "magick/colorspace.h"
00134 #include "magick/cache-view.h"
00135 #include "magick/color.h"
00136 #include "magick/composite.h"
00137 #include "magick/compress.h"
00138 #include "magick/effect.h"
00139 #include "magick/geometry.h"
00140 #include "magick/layer.h"
00141 #include "magick/locale_.h"
00142 #include "magick/monitor.h"
00143 #include "magick/pixel.h"
00144 #include "magick/profile.h"
00145 #include "magick/quantum.h"
00146 #include "magick/resample.h"
00147 #include "magick/resize.h"
00148 #include "magick/semaphore.h"
00149 #include "magick/stream.h"
00150 #include "magick/timer.h"
00151 
00152 struct _Image
00153 {
00154   ClassType
00155     storage_class;
00156 
00157   ColorspaceType
00158     colorspace;      /* colorspace of image data */
00159 
00160   CompressionType
00161     compression;     /* compression of image when read/write */
00162 
00163   size_t
00164     quality;         /* compression quality setting, meaning varies */
00165 
00166   OrientationType
00167     orientation;     /* photo orientation of image */
00168 
00169   MagickBooleanType
00170     taint,           /* has image been modified since reading */
00171     matte;           /* is transparency channel defined and active */
00172 
00173   size_t
00174     columns,         /* physical size of image */
00175     rows,
00176     depth,           /* depth of image on read/write */
00177     colors;          /* size of color table on read */
00178 
00179   PixelPacket
00180     *colormap,
00181     background_color, /* current background color attribute */
00182     border_color,     /* current bordercolor attribute */
00183     matte_color;      /* current mattecolor attribute */
00184 
00185   double
00186     gamma;
00187 
00188   ChromaticityInfo
00189     chromaticity;
00190 
00191   RenderingIntent
00192     rendering_intent;
00193 
00194   void
00195     *profiles;
00196 
00197   ResolutionType
00198     units;          /* resolution/density  ppi or ppc */
00199 
00200   char
00201     *montage,
00202     *directory,
00203     *geometry;
00204 
00205   ssize_t
00206     offset;
00207 
00208   double
00209     x_resolution,   /* image resolution/density */
00210     y_resolution;
00211 
00212   RectangleInfo
00213     page,           /* virtual canvas size and offset of image */
00214     extract_info,
00215     tile_info;      /* deprecated */
00216 
00217   double
00218     bias,
00219     blur,           /* deprecated */
00220     fuzz;           /* current color fuzz attribute */
00221 
00222   FilterTypes
00223     filter;         /* resize/distort filter to apply */
00224 
00225   InterlaceType
00226     interlace;
00227 
00228   EndianType
00229     endian;         /* raw data integer ordering on read/write */
00230 
00231   GravityType
00232     gravity;        /* Gravity attribute for positioning in image */
00233 
00234   CompositeOperator
00235     compose;        /* alpha composition method for layered images */
00236 
00237   DisposeType
00238     dispose;        /* GIF animation disposal method */
00239 
00240   struct _Image
00241     *clip_mask;
00242 
00243   size_t
00244     scene,          /* index of image in multi-image file */
00245     delay;          /* Animation delay time */
00246 
00247   ssize_t
00248     ticks_per_second;  /* units for delay time, default 100 for GIF */
00249 
00250   size_t
00251     iterations,
00252     total_colors;
00253 
00254   ssize_t
00255     start_loop;
00256 
00257   ErrorInfo
00258     error;
00259 
00260   TimerInfo
00261     timer;
00262 
00263   MagickProgressMonitor
00264     progress_monitor;
00265 
00266   void
00267     *client_data,
00268     *cache,
00269     *attributes;      /* deprecated */
00270 
00271   Ascii85Info
00272     *ascii85;
00273 
00274   BlobInfo
00275     *blob;
00276 
00277   char
00278     filename[MaxTextExtent],         /* images input filename */
00279     magick_filename[MaxTextExtent],  /* ditto with coders, and read_mods */
00280     magick[MaxTextExtent];           /* Coder used to decode image */
00281 
00282   size_t
00283     magick_columns,
00284     magick_rows;
00285 
00286   ExceptionInfo
00287     exception;        /* Error handling report */
00288 
00289   MagickBooleanType
00290     debug;            /* debug output attribute */
00291 
00292   volatile ssize_t
00293     reference_count;
00294 
00295   SemaphoreInfo
00296     *semaphore;
00297 
00298   ProfileInfo
00299     color_profile,
00300     iptc_profile,
00301     *generic_profile;
00302 
00303   size_t
00304     generic_profiles;  /* this & ProfileInfo is deprecated */
00305 
00306   size_t
00307     signature;
00308 
00309   struct _Image
00310     *previous,         /* Image list links */
00311     *list,             /* Undo/Redo image processing list (for display) */
00312     *next;             /* Image list links */
00313 
00314   InterpolatePixelMethod
00315     interpolate;       /* Interpolation of color for between pixel lookups */
00316 
00317   MagickBooleanType
00318     black_point_compensation;
00319 
00320   PixelPacket
00321     transparent_color; /* color for 'transparent' color index in GIF */
00322 
00323   struct _Image
00324     *mask;
00325 
00326   RectangleInfo
00327     tile_offset;
00328 
00329   void
00330     *properties,       /* per image properities */
00331     *artifacts;        /* per image sequence image artifacts */
00332 
00333   ImageType
00334     type;
00335 
00336   MagickBooleanType
00337     dither;            /* dithering method during color reduction */
00338 
00339   MagickSizeType
00340     extent;
00341 
00342   MagickBooleanType
00343     ping;
00344 
00345   size_t
00346     channels;
00347 
00348   time_t
00349     timestamp;
00350 
00351   PixelIntensityMethod
00352     intensity;      /* method to generate an intensity value from a pixel */
00353 
00354   size_t
00355     duration;       /* Total animation duration sum(delay*iterations) */
00356 
00357   long
00358     tietz_offset;
00359 };
00360 
00361 struct _ImageInfo
00362 {
00363   CompressionType
00364     compression;
00365 
00366   OrientationType
00367     orientation;
00368 
00369   MagickBooleanType
00370     temporary,
00371     adjoin,
00372     affirm,
00373     antialias;
00374 
00375   char
00376     *size,
00377     *extract,
00378     *page,
00379     *scenes;
00380 
00381   size_t
00382     scene,
00383     number_scenes,
00384     depth;
00385 
00386   InterlaceType
00387     interlace;
00388 
00389   EndianType
00390     endian;
00391 
00392   ResolutionType
00393     units;
00394 
00395   size_t
00396     quality;
00397 
00398   char
00399     *sampling_factor,
00400     *server_name,
00401     *font,
00402     *texture,
00403     *density;
00404 
00405   double
00406     pointsize,
00407     fuzz;
00408 
00409   PixelPacket
00410     background_color,
00411     border_color,
00412     matte_color;
00413 
00414   MagickBooleanType
00415     dither,
00416     monochrome;
00417 
00418   size_t
00419     colors;
00420 
00421   ColorspaceType
00422     colorspace;
00423 
00424   ImageType
00425     type;
00426 
00427   PreviewType
00428     preview_type;
00429 
00430   ssize_t
00431     group;
00432 
00433   MagickBooleanType
00434     ping,
00435     verbose;
00436 
00437   char
00438     *view,
00439     *authenticate;
00440 
00441   ChannelType
00442     channel;
00443 
00444   Image
00445     *attributes;  /* deprecated */
00446 
00447   void
00448     *options;
00449 
00450   MagickProgressMonitor
00451     progress_monitor;
00452 
00453   void
00454     *client_data,
00455     *cache;
00456 
00457   StreamHandler
00458     stream;
00459 
00460   FILE
00461     *file;
00462 
00463   void
00464     *blob;
00465 
00466   size_t
00467     length;
00468 
00469   char
00470     magick[MaxTextExtent],
00471     unique[MaxTextExtent],
00472     zero[MaxTextExtent],
00473     filename[MaxTextExtent];
00474 
00475   MagickBooleanType
00476     debug;
00477 
00478   char
00479     *tile;  /* deprecated */
00480 
00481   size_t
00482     subimage,  /* deprecated */
00483     subrange;  /* deprecated */
00484 
00485   PixelPacket
00486     pen;  /* deprecated */
00487 
00488   size_t
00489     signature;
00490 
00491   VirtualPixelMethod
00492     virtual_pixel_method;
00493 
00494   PixelPacket
00495     transparent_color;
00496 
00497   void
00498     *profile;
00499 
00500   MagickBooleanType
00501     synchronize;
00502 };
00503 
00504 extern MagickExport ExceptionType
00505   CatchImageException(Image *);
00506 
00507 extern MagickExport FILE
00508   *GetImageInfoFile(const ImageInfo *);
00509 
00510 extern MagickExport Image
00511   *AcquireImage(const ImageInfo *),
00512   *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
00513   *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
00514     ExceptionInfo *),
00515   *DestroyImage(Image *),
00516   *GetImageClipMask(const Image *,ExceptionInfo *) magick_attribute((__pure__)),
00517   *GetImageMask(const Image *,ExceptionInfo *) magick_attribute((__pure__)),
00518   *NewMagickImage(const ImageInfo *,const size_t,const size_t,
00519     const MagickPixelPacket *),
00520   *ReferenceImage(Image *),
00521   *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
00522     ExceptionInfo *);
00523 
00524 extern MagickExport ImageInfo
00525   *AcquireImageInfo(void),
00526   *CloneImageInfo(const ImageInfo *),
00527   *DestroyImageInfo(ImageInfo *);
00528 
00529 extern MagickExport MagickBooleanType
00530   ClipImage(Image *),
00531   ClipImagePath(Image *,const char *,const MagickBooleanType),
00532   CopyImagePixels(Image *,const Image *,const RectangleInfo *,
00533     const OffsetInfo *,ExceptionInfo *),
00534   IsTaintImage(const Image *),
00535   IsMagickConflict(const char *) magick_attribute((__pure__)),
00536   IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
00537   IsImageObject(const Image *),
00538   ListMagickInfo(FILE *,ExceptionInfo *),
00539   ModifyImage(Image **,ExceptionInfo *),
00540   ResetImagePage(Image *,const char *),
00541   ResetImagePixels(Image *,ExceptionInfo *),
00542   SetImageBackgroundColor(Image *),
00543   SetImageClipMask(Image *,const Image *),
00544   SetImageColor(Image *,const MagickPixelPacket *),
00545   SetImageExtent(Image *,const size_t,const size_t),
00546   SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
00547   SetImageMask(Image *,const Image *),
00548   SetImageOpacity(Image *,const Quantum),
00549   SetImageChannels(Image *,const size_t),
00550   SetImageStorageClass(Image *,const ClassType),
00551   StripImage(Image *),
00552   SyncImage(Image *),
00553   SyncImageSettings(const ImageInfo *,Image *),
00554   SyncImagesSettings(ImageInfo *,Image *);
00555 
00556 extern MagickExport size_t
00557   InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *);
00558 
00559 extern MagickExport ssize_t
00560   GetImageReferenceCount(Image *);
00561 
00562 extern MagickExport size_t
00563   GetImageChannels(Image *);
00564 
00565 extern MagickExport VirtualPixelMethod
00566   GetImageVirtualPixelMethod(const Image *),
00567   SetImageVirtualPixelMethod(const Image *,const VirtualPixelMethod);
00568 
00569 extern MagickExport void
00570   AcquireNextImage(const ImageInfo *,Image *),
00571   DestroyImagePixels(Image *),
00572   DisassociateImageStream(Image *),
00573   GetImageException(Image *,ExceptionInfo *),
00574   GetImageInfo(ImageInfo *),
00575   SetImageInfoBlob(ImageInfo *,const void *,const size_t),
00576   SetImageInfoFile(ImageInfo *,FILE *);
00577 
00578 #if defined(__cplusplus) || defined(c_plusplus)
00579 }
00580 #endif
00581 
00582 #endif

Generated on 15 Jun 2020 for MagickCore by  doxygen 1.6.1