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