]> granicus.if.org Git - imagemagick/blob - magick/image.h
(no commit message)
[imagemagick] / magick / image.h
1 /*
2   Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
3   dedicated to making software imaging solutions freely available.
4   
5   You may not use this file except in compliance with the License.
6   obtain a copy of the License at
7   
8     http://www.imagemagick.org/script/license.php
9   
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15
16   MagickCore image methods.
17 */
18 #ifndef _MAGICKCORE_IMAGE_H
19 #define _MAGICKCORE_IMAGE_H
20
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24
25 #include <magick/color.h>
26
27 #define OpaqueOpacity  ((Quantum) 0UL)
28 #define TransparentOpacity  ((Quantum) QuantumRange)
29
30 typedef enum
31 {
32   UndefinedAlphaChannel,
33   ActivateAlphaChannel,
34   BackgroundAlphaChannel,
35   CopyAlphaChannel,
36   DeactivateAlphaChannel,
37   ExtractAlphaChannel,
38   OpaqueAlphaChannel,
39   ResetAlphaChannel,  /* deprecated */
40   SetAlphaChannel,
41   ShapeAlphaChannel,
42   TransparentAlphaChannel
43 } AlphaChannelType;
44
45 typedef enum
46 {
47   UndefinedType,
48   BilevelType,
49   GrayscaleType,
50   GrayscaleMatteType,
51   PaletteType,
52   PaletteMatteType,
53   TrueColorType,
54   TrueColorMatteType,
55   ColorSeparationType,
56   ColorSeparationMatteType,
57   OptimizeType,
58   PaletteBilevelMatteType
59 } ImageType;
60
61 typedef enum
62 {
63   UndefinedInterlace,
64   NoInterlace,
65   LineInterlace,
66   PlaneInterlace,
67   PartitionInterlace,
68   GIFInterlace,
69   JPEGInterlace,
70   PNGInterlace
71 } InterlaceType;
72
73 typedef enum
74 {
75   UndefinedOrientation,
76   TopLeftOrientation,
77   TopRightOrientation,
78   BottomRightOrientation,
79   BottomLeftOrientation,
80   LeftTopOrientation,
81   RightTopOrientation,
82   RightBottomOrientation,
83   LeftBottomOrientation
84 } OrientationType;
85
86 typedef enum
87 {
88   UndefinedResolution,
89   PixelsPerInchResolution,
90   PixelsPerCentimeterResolution
91 } ResolutionType;
92
93 typedef struct _PrimaryInfo
94 {
95   double
96     x,
97     y,
98     z;
99 } PrimaryInfo;
100
101 typedef struct _SegmentInfo
102 {
103   double
104     x1,
105     y1,
106     x2,
107     y2;
108 } SegmentInfo;
109
110 typedef enum
111 {
112   UndefinedTransmitType,
113   FileTransmitType,
114   BlobTransmitType,
115   StreamTransmitType,
116   ImageTransmitType
117 } TransmitType;
118
119 typedef struct _ChromaticityInfo
120 {
121   PrimaryInfo
122     red_primary,
123     green_primary,
124     blue_primary,
125     white_point;
126 } ChromaticityInfo;
127
128 #include "magick/blob.h"
129 #include "magick/colorspace.h"
130 #include "magick/cache-view.h"
131 #include "magick/color.h"
132 #include "magick/composite.h"
133 #include "magick/compress.h"
134 #include "magick/effect.h"
135 #include "magick/geometry.h"
136 #include "magick/layer.h"
137 #include "magick/monitor.h"
138 #include "magick/pixel.h"
139 #include "magick/profile.h"
140 #include "magick/quantum.h"
141 #include "magick/resample.h"
142 #include "magick/resize.h"
143 #include "magick/semaphore.h"
144 #include "magick/stream.h"
145 #include "magick/timer.h"
146
147 struct _Image
148 {
149   ClassType
150     storage_class;
151
152   ColorspaceType
153     colorspace;
154
155   CompressionType
156     compression;
157
158   unsigned long
159     quality;
160
161   OrientationType
162     orientation;
163
164   MagickBooleanType
165     taint,
166     matte;
167
168   unsigned long
169     columns,
170     rows,
171     depth,
172     colors;
173
174   PixelPacket
175     *colormap,
176     background_color,
177     border_color,
178     matte_color;
179
180   double
181     gamma;
182
183   ChromaticityInfo
184     chromaticity;
185
186   RenderingIntent
187     rendering_intent;
188
189   void
190     *profiles;
191
192   ResolutionType
193     units;
194
195   char
196     *montage,
197     *directory,
198     *geometry;
199
200   long
201     offset;
202
203   double
204     x_resolution,
205     y_resolution;
206
207   RectangleInfo
208     page,
209     extract_info,
210     tile_info;  /* deprecated */
211
212   double
213     bias,
214     blur,  /* deprecated */
215     fuzz;
216
217   FilterTypes
218     filter;
219
220   InterlaceType
221     interlace;
222
223   EndianType
224     endian;
225
226   GravityType
227     gravity;
228
229   CompositeOperator
230     compose;
231
232   DisposeType
233     dispose;
234
235   struct _Image
236     *clip_mask;
237
238   unsigned long
239     scene,
240     delay;
241
242   long
243     ticks_per_second;
244
245   unsigned long
246     iterations,
247     total_colors;
248
249   long
250     start_loop;
251
252   ErrorInfo
253     error;
254
255   TimerInfo
256     timer;
257
258   MagickProgressMonitor
259     progress_monitor;
260
261   void
262     *client_data,
263     *cache,
264     *attributes;  /* deprecated */
265
266   Ascii85Info
267     *ascii85;
268
269   BlobInfo
270     *blob;
271
272   char
273     filename[MaxTextExtent],
274     magick_filename[MaxTextExtent],
275     magick[MaxTextExtent];
276
277   unsigned long
278     magick_columns,
279     magick_rows;
280
281   ExceptionInfo
282     exception;
283
284   MagickBooleanType
285     debug;
286
287   volatile long
288     reference_count;
289
290   SemaphoreInfo
291     *semaphore;
292
293   ProfileInfo
294     color_profile,
295     iptc_profile,
296     *generic_profile;
297
298   unsigned long
299     generic_profiles;  /* this & ProfileInfo is deprecated */
300
301   unsigned long
302     signature;
303
304   struct _Image
305     *previous,
306     *list,
307     *next;
308
309   InterpolatePixelMethod
310     interpolate;
311
312   MagickBooleanType
313     black_point_compensation;
314
315   PixelPacket
316     transparent_color;
317
318   struct _Image
319     *mask;
320
321   RectangleInfo
322     tile_offset;
323
324   void
325     *properties,
326     *artifacts;
327
328   ImageType
329     type;
330
331   MagickBooleanType
332     dither;
333
334   MagickSizeType
335     extent;
336
337   MagickBooleanType
338     ping;
339 };
340
341 struct _ImageInfo
342 {
343   CompressionType
344     compression;
345
346   OrientationType
347     orientation;
348
349   MagickBooleanType
350     temporary,
351     adjoin,
352     affirm,
353     antialias;
354
355   char
356     *size,
357     *extract,
358     *page,
359     *scenes;
360
361   unsigned long
362     scene,
363     number_scenes,
364     depth;
365
366   InterlaceType
367     interlace;
368
369   EndianType
370     endian;
371
372   ResolutionType
373     units;
374
375   unsigned long
376     quality;
377
378   char
379     *sampling_factor,
380     *server_name,
381     *font,
382     *texture,
383     *density;
384
385   double
386     pointsize,
387     fuzz;
388
389   PixelPacket
390     background_color,
391     border_color,
392     matte_color;
393
394   MagickBooleanType
395     dither,
396     monochrome;
397
398   unsigned long
399     colors;
400
401   ColorspaceType
402     colorspace;
403
404   ImageType
405     type;
406
407   PreviewType
408     preview_type;
409
410   long
411     group;
412
413   MagickBooleanType
414     ping,
415     verbose;
416
417   char
418     *view,
419     *authenticate;
420
421   ChannelType
422     channel;
423
424   Image
425     *attributes;  /* deprecated */
426
427   void
428     *options;
429
430   MagickProgressMonitor
431     progress_monitor;
432
433   void
434     *client_data,
435     *cache;
436
437   StreamHandler
438     stream;
439
440   FILE
441     *file;
442
443   void
444     *blob;
445
446   size_t
447     length;
448
449   char
450     magick[MaxTextExtent],
451     unique[MaxTextExtent],
452     zero[MaxTextExtent],
453     filename[MaxTextExtent];
454
455   MagickBooleanType
456     debug;
457
458   char
459     *tile;  /* deprecated */
460
461   unsigned long
462     subimage,  /* deprecated */
463     subrange;  /* deprecated */
464
465   PixelPacket
466     pen;  /* deprecated */
467
468   unsigned long
469     signature;
470
471   VirtualPixelMethod
472     virtual_pixel_method;
473
474   PixelPacket
475     transparent_color;
476
477   void
478     *profile;
479
480   MagickBooleanType
481     synchronize;
482 };
483
484 extern MagickExport ExceptionType
485   CatchImageException(Image *);
486
487 extern MagickExport FILE
488   *GetImageInfoFile(const ImageInfo *);
489
490 extern MagickExport Image
491   *AcquireImage(const ImageInfo *),
492   *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
493   *CloneImage(const Image *,const unsigned long,const unsigned long,
494     const MagickBooleanType,ExceptionInfo *),
495   *CombineImages(const Image *,const ChannelType,ExceptionInfo *),
496   *DestroyImage(Image *),
497   *GetImageClipMask(const Image *,ExceptionInfo *),
498   *GetImageMask(const Image *,ExceptionInfo *),
499   *NewMagickImage(const ImageInfo *,const unsigned long,const unsigned long,
500     const MagickPixelPacket *),
501   *ReferenceImage(Image *),
502   *SeparateImages(const Image *,const ChannelType,ExceptionInfo *);
503
504 extern MagickExport ImageInfo
505   *AcquireImageInfo(void),
506   *CloneImageInfo(const ImageInfo *),
507   *DestroyImageInfo(ImageInfo *);
508
509 extern MagickExport long
510   GetImageReferenceCount(Image *);
511
512 extern MagickExport MagickBooleanType
513   ClipImage(Image *),
514   ClipImagePath(Image *,const char *,const MagickBooleanType),
515   GetImageAlphaChannel(const Image *),
516   IsTaintImage(const Image *),
517   IsMagickConflict(const char *),
518   IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
519   IsImageObject(const Image *),
520   ListMagickInfo(FILE *,ExceptionInfo *),
521   ModifyImage(Image **,ExceptionInfo *),
522   ResetImagePage(Image *,const char *),
523   SeparateImageChannel(Image *,const ChannelType),
524   SetImageAlphaChannel(Image *,const AlphaChannelType),
525   SetImageBackgroundColor(Image *),
526   SetImageClipMask(Image *,const Image *),
527   SetImageExtent(Image *,const unsigned long,const unsigned long),
528   SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
529   SetImageMask(Image *,const Image *),
530   SetImageOpacity(Image *,const Quantum),
531   SetImageStorageClass(Image *,const ClassType),
532   SetImageType(Image *,const ImageType),
533   StripImage(Image *),
534   SyncImage(Image *),
535   SyncImageSettings(const ImageInfo *,Image *),
536   SyncImagesSettings(ImageInfo *,Image *);
537
538 extern MagickExport size_t
539   InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *);
540
541 extern MagickExport VirtualPixelMethod
542   GetImageVirtualPixelMethod(const Image *),
543   SetImageVirtualPixelMethod(const Image *,const VirtualPixelMethod);
544
545 extern MagickExport void
546   AcquireNextImage(const ImageInfo *,Image *),
547   DestroyImagePixels(Image *),
548   DisassociateImageStream(Image *),
549   GetImageException(Image *,ExceptionInfo *),
550   GetImageInfo(ImageInfo *),
551   SetImageInfoBlob(ImageInfo *,const void *,const size_t),
552   SetImageInfoFile(ImageInfo *,FILE *);
553
554 #if defined(__cplusplus) || defined(c_plusplus)
555 }
556 #endif
557
558 #endif