File indexing completed on 2025-09-16 08:58:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef MAGICKCORE_IMAGE_H
0019 #define MAGICKCORE_IMAGE_H
0020
0021 #if defined(__cplusplus) || defined(c_plusplus)
0022 extern "C" {
0023 #endif
0024
0025 #define OpaqueAlpha ((Quantum) QuantumRange)
0026 #define TransparentAlpha ((Quantum) 0)
0027
0028 typedef enum
0029 {
0030 UndefinedType,
0031 BilevelType,
0032 GrayscaleType,
0033 GrayscaleAlphaType,
0034 PaletteType,
0035 PaletteAlphaType,
0036 TrueColorType,
0037 TrueColorAlphaType,
0038 ColorSeparationType,
0039 ColorSeparationAlphaType,
0040 OptimizeType,
0041 PaletteBilevelAlphaType
0042 } ImageType;
0043
0044 typedef enum
0045 {
0046 UndefinedInterlace,
0047 NoInterlace,
0048 LineInterlace,
0049 PlaneInterlace,
0050 PartitionInterlace,
0051 GIFInterlace,
0052 JPEGInterlace,
0053 PNGInterlace
0054 } InterlaceType;
0055
0056 typedef enum
0057 {
0058 UndefinedOrientation,
0059 TopLeftOrientation,
0060 TopRightOrientation,
0061 BottomRightOrientation,
0062 BottomLeftOrientation,
0063 LeftTopOrientation,
0064 RightTopOrientation,
0065 RightBottomOrientation,
0066 LeftBottomOrientation
0067 } OrientationType;
0068
0069 typedef enum
0070 {
0071 UndefinedResolution,
0072 PixelsPerInchResolution,
0073 PixelsPerCentimeterResolution
0074 } ResolutionType;
0075
0076 typedef struct _PrimaryInfo
0077 {
0078 double
0079 x,
0080 y,
0081 z;
0082 } PrimaryInfo;
0083
0084 typedef struct _SegmentInfo
0085 {
0086 double
0087 x1,
0088 y1,
0089 x2,
0090 y2;
0091 } SegmentInfo;
0092
0093 typedef enum
0094 {
0095 UndefinedTransmitType,
0096 FileTransmitType,
0097 BlobTransmitType,
0098 StreamTransmitType,
0099 ImageTransmitType
0100 } TransmitType;
0101
0102 typedef struct _ChromaticityInfo
0103 {
0104 PrimaryInfo
0105 red_primary,
0106 green_primary,
0107 blue_primary,
0108 white_point;
0109 } ChromaticityInfo;
0110
0111 #include "MagickCore/blob.h"
0112 #include "MagickCore/colorspace.h"
0113 #include "MagickCore/cache-view.h"
0114 #include "MagickCore/color.h"
0115 #include "MagickCore/composite.h"
0116 #include "MagickCore/compress.h"
0117 #include "MagickCore/effect.h"
0118 #include "MagickCore/geometry.h"
0119 #include "MagickCore/layer.h"
0120 #include "MagickCore/locale_.h"
0121 #include "MagickCore/monitor.h"
0122 #include "MagickCore/pixel.h"
0123 #include "MagickCore/profile.h"
0124 #include "MagickCore/quantum.h"
0125 #include "MagickCore/resample.h"
0126 #include "MagickCore/resize.h"
0127 #include "MagickCore/semaphore.h"
0128 #include "MagickCore/stream.h"
0129 #include "MagickCore/timer.h"
0130
0131 struct _Image
0132 {
0133 ClassType
0134 storage_class;
0135
0136 ColorspaceType
0137 colorspace;
0138
0139 CompressionType
0140 compression;
0141
0142 size_t
0143 quality;
0144
0145 OrientationType
0146 orientation;
0147
0148 MagickBooleanType
0149 taint;
0150
0151 size_t
0152 columns,
0153 rows,
0154 depth,
0155 colors;
0156
0157
0158 PixelInfo
0159 *colormap,
0160 alpha_color,
0161 background_color,
0162 border_color,
0163 transparent_color;
0164
0165 double
0166 gamma;
0167
0168 ChromaticityInfo
0169 chromaticity;
0170
0171 RenderingIntent
0172 rendering_intent;
0173
0174 void
0175 *profiles;
0176
0177 ResolutionType
0178 units;
0179
0180 char
0181 *montage,
0182 *directory,
0183 *geometry;
0184
0185 ssize_t
0186 offset;
0187
0188 PointInfo
0189 resolution;
0190
0191 RectangleInfo
0192 page,
0193 extract_info;
0194
0195 double
0196 fuzz;
0197
0198 FilterType
0199 filter;
0200
0201 PixelIntensityMethod
0202 intensity;
0203
0204 InterlaceType
0205 interlace;
0206
0207 EndianType
0208 endian;
0209
0210 GravityType
0211 gravity;
0212
0213 CompositeOperator
0214 compose;
0215
0216 DisposeType
0217 dispose;
0218
0219 size_t
0220 scene,
0221 delay,
0222 duration;
0223
0224 ssize_t
0225 ticks_per_second;
0226
0227 size_t
0228 iterations,
0229 total_colors;
0230
0231 ssize_t
0232 start_loop;
0233
0234 PixelInterpolateMethod
0235 interpolate;
0236
0237 MagickBooleanType
0238 black_point_compensation;
0239
0240 RectangleInfo
0241 tile_offset;
0242
0243 ImageType
0244 type;
0245
0246 MagickBooleanType
0247 dither;
0248
0249 MagickSizeType
0250 extent;
0251
0252 MagickBooleanType
0253 ping;
0254
0255 MagickBooleanType
0256 read_mask,
0257 write_mask;
0258
0259 PixelTrait
0260 alpha_trait;
0261
0262 size_t
0263 number_channels,
0264 number_meta_channels,
0265 metacontent_extent;
0266
0267 ChannelType
0268 channel_mask;
0269
0270 PixelChannelMap
0271 *channel_map;
0272
0273 void
0274 *cache;
0275
0276 ErrorInfo
0277 error;
0278
0279 TimerInfo
0280 timer;
0281
0282 MagickProgressMonitor
0283 progress_monitor;
0284
0285 void
0286 *client_data;
0287
0288 Ascii85Info
0289 *ascii85;
0290
0291 ProfileInfo
0292 *generic_profile;
0293
0294 void
0295 *properties,
0296 *artifacts;
0297
0298 char
0299 filename[MagickPathExtent],
0300 magick_filename[MagickPathExtent],
0301 magick[MagickPathExtent];
0302
0303 size_t
0304 magick_columns,
0305 magick_rows;
0306
0307 BlobInfo
0308 *blob;
0309
0310 time_t
0311 timestamp;
0312
0313 MagickBooleanType
0314 debug;
0315
0316 ssize_t
0317 reference_count;
0318
0319 SemaphoreInfo
0320 *semaphore;
0321
0322 struct _ImageInfo
0323 *image_info;
0324
0325
0326
0327
0328 struct _Image
0329 *list,
0330 *previous,
0331 *next;
0332
0333 size_t
0334 signature;
0335
0336 PixelInfo
0337 matte_color;
0338
0339 MagickBooleanType
0340 composite_mask;
0341
0342 PixelTrait
0343 mask_trait;
0344
0345 ChannelType
0346 channels;
0347
0348 time_t
0349 ttl;
0350 };
0351
0352
0353
0354
0355
0356
0357
0358 struct _ImageInfo
0359 {
0360 CompressionType
0361 compression;
0362
0363 OrientationType
0364 orientation;
0365
0366 MagickBooleanType
0367 temporary,
0368 adjoin,
0369 affirm,
0370 antialias;
0371
0372 char
0373 *size,
0374 *extract,
0375 *page,
0376 *scenes;
0377
0378 size_t
0379 scene,
0380 number_scenes,
0381 depth;
0382
0383 InterlaceType
0384 interlace;
0385
0386 EndianType
0387 endian;
0388
0389 ResolutionType
0390 units;
0391
0392 size_t
0393 quality;
0394
0395 char
0396 *sampling_factor,
0397 *server_name,
0398 *font,
0399 *texture,
0400 *density;
0401
0402 double
0403 pointsize,
0404 fuzz;
0405
0406 PixelInfo
0407 alpha_color,
0408 background_color,
0409 border_color,
0410 transparent_color;
0411
0412
0413
0414 MagickBooleanType
0415 dither,
0416 monochrome;
0417
0418 ColorspaceType
0419 colorspace;
0420
0421 CompositeOperator
0422 compose;
0423
0424 ImageType
0425 type;
0426
0427 MagickBooleanType
0428 ping,
0429 verbose;
0430
0431 ChannelType
0432 channel;
0433
0434 void
0435 *options;
0436
0437 void
0438 *profile;
0439
0440 MagickBooleanType
0441 synchronize;
0442
0443 MagickProgressMonitor
0444 progress_monitor;
0445
0446 void
0447 *client_data,
0448 *cache;
0449
0450 StreamHandler
0451 stream;
0452
0453 FILE
0454 *file;
0455
0456 void
0457 *blob;
0458
0459 size_t
0460 length;
0461
0462 char
0463 magick[MagickPathExtent],
0464 unique[MagickPathExtent],
0465 filename[MagickPathExtent];
0466
0467 MagickBooleanType
0468 debug;
0469
0470 size_t
0471 signature;
0472
0473 CustomStreamInfo
0474 *custom_stream;
0475
0476 PixelInfo
0477 matte_color;
0478 };
0479
0480 extern MagickExport ChannelType
0481 SetImageChannelMask(Image *,const ChannelType);
0482
0483 extern MagickExport ExceptionType
0484 CatchImageException(Image *);
0485
0486 extern MagickExport FILE
0487 *GetImageInfoFile(const ImageInfo *);
0488
0489 extern MagickExport Image
0490 *AcquireImage(const ImageInfo *,ExceptionInfo *),
0491 *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
0492 *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
0493 ExceptionInfo *),
0494 *DestroyImage(Image *),
0495 *GetImageMask(const Image *,const PixelMask,ExceptionInfo *),
0496 *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *,
0497 ExceptionInfo *),
0498 *ReferenceImage(Image *),
0499 *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
0500 ExceptionInfo *);
0501
0502 extern MagickExport ImageInfo
0503 *AcquireImageInfo(void),
0504 *CloneImageInfo(const ImageInfo *),
0505 *DestroyImageInfo(ImageInfo *);
0506
0507 extern MagickExport MagickBooleanType
0508 ClipImage(Image *,ExceptionInfo *),
0509 ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
0510 CopyImagePixels(Image *,const Image *,const RectangleInfo *,
0511 const OffsetInfo *,ExceptionInfo *),
0512 IsTaintImage(const Image *),
0513 IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
0514 IsImageObject(const Image *),
0515 ListMagickInfo(FILE *,ExceptionInfo *),
0516 ModifyImage(Image **,ExceptionInfo *),
0517 ResetImagePage(Image *,const char *),
0518 ResetImagePixels(Image *,ExceptionInfo *),
0519 SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
0520 SetImageBackgroundColor(Image *,ExceptionInfo *),
0521 SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
0522 SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
0523 SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
0524 SetImageMask(Image *,const PixelMask type,const Image *,ExceptionInfo *),
0525 SetImageRegionMask(Image *,const PixelMask type,const RectangleInfo *,
0526 ExceptionInfo *),
0527 SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
0528 StripImage(Image *,ExceptionInfo *),
0529 SyncImage(Image *,ExceptionInfo *),
0530 SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *),
0531 SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *);
0532
0533 extern MagickExport size_t
0534 InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *,
0535 ExceptionInfo *);
0536
0537 extern MagickExport ssize_t
0538 GetImageReferenceCount(Image *);
0539
0540 extern MagickExport VirtualPixelMethod
0541 GetImageVirtualPixelMethod(const Image *),
0542 SetImageVirtualPixelMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
0543
0544 extern MagickExport void
0545 AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *),
0546 DestroyImagePixels(Image *),
0547 DisassociateImageStream(Image *),
0548 GetImageInfo(ImageInfo *),
0549 SetImageInfoBlob(ImageInfo *,const void *,const size_t),
0550 SetImageInfoFile(ImageInfo *,FILE *),
0551 SetImageInfoCustomStream(ImageInfo *,CustomStreamInfo *);
0552
0553 #if defined(__cplusplus) || defined(c_plusplus)
0554 }
0555 #endif
0556
0557 #endif