]> 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
335 struct _ImageInfo
336 {
337   CompressionType
338     compression;
339
340   OrientationType
341     orientation;
342
343   MagickBooleanType
344     temporary,
345     adjoin,
346     affirm,
347     antialias;
348
349   char
350     *size,
351     *extract,
352     *page,
353     *scenes;
354
355   unsigned long
356     scene,
357     number_scenes,
358     depth;
359
360   InterlaceType
361     interlace;
362
363   EndianType
364     endian;
365
366   ResolutionType
367     units;
368
369   unsigned long
370     quality;
371
372   char
373     *sampling_factor,
374     *server_name,
375     *font,
376     *texture,
377     *density;
378
379   double
380     pointsize,
381     fuzz;
382
383   PixelPacket
384     background_color,
385     border_color,
386     matte_color;
387
388   MagickBooleanType
389     dither,
390     monochrome;
391
392   unsigned long
393     colors;
394
395   ColorspaceType
396     colorspace;
397
398   ImageType
399     type;
400
401   PreviewType
402     preview_type;
403
404   long
405     group;
406
407   MagickBooleanType
408     ping,
409     verbose;
410
411   char
412     *view,
413     *authenticate;
414
415   ChannelType
416     channel;
417
418   Image
419     *attributes;  /* deprecated */
420
421   void
422     *options;
423
424   MagickProgressMonitor
425     progress_monitor;
426
427   void
428     *client_data,
429     *cache;
430
431   StreamHandler
432     stream;
433
434   FILE
435     *file;
436
437   void
438     *blob;
439
440   size_t
441     length;
442
443   char
444     magick[MaxTextExtent],
445     unique[MaxTextExtent],
446     zero[MaxTextExtent],
447     filename[MaxTextExtent];
448
449   MagickBooleanType
450     debug;
451
452   char
453     *tile;  /* deprecated */
454
455   unsigned long
456     subimage,  /* deprecated */
457     subrange;  /* deprecated */
458
459   PixelPacket
460     pen;  /* deprecated */
461
462   unsigned long
463     signature;
464
465   VirtualPixelMethod
466     virtual_pixel_method;
467
468   PixelPacket
469     transparent_color;
470
471   void
472     *profile;
473
474   MagickBooleanType
475     synchronize;
476 };
477
478 extern MagickExport ExceptionType
479   CatchImageException(Image *);
480
481 extern MagickExport FILE
482   *GetImageInfoFile(const ImageInfo *);
483
484 extern MagickExport Image
485   *AcquireImage(const ImageInfo *),
486   *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
487   *CloneImage(const Image *,const unsigned long,const unsigned long,
488     const MagickBooleanType,ExceptionInfo *),
489   *CombineImages(const Image *,const ChannelType,ExceptionInfo *),
490   *DestroyImage(Image *),
491   *GetImageClipMask(const Image *,ExceptionInfo *),
492   *GetImageMask(const Image *,ExceptionInfo *),
493   *NewMagickImage(const ImageInfo *,const unsigned long,const unsigned long,
494     const MagickPixelPacket *),
495   *ReferenceImage(Image *),
496   *SeparateImages(const Image *,const ChannelType,ExceptionInfo *);
497
498 extern MagickExport ImageInfo
499   *AcquireImageInfo(void),
500   *CloneImageInfo(const ImageInfo *),
501   *DestroyImageInfo(ImageInfo *);
502
503 extern MagickExport long
504   GetImageReferenceCount(Image *);
505
506 extern MagickExport MagickBooleanType
507   AcquireImageColormap(Image *,const unsigned long),
508   ClipImage(Image *),
509   ClipImagePath(Image *,const char *,const MagickBooleanType),
510   GetImageAlphaChannel(const Image *),
511   IsTaintImage(const Image *),
512   IsMagickConflict(const char *),
513   IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
514   IsImageObject(const Image *),
515   ListMagickInfo(FILE *,ExceptionInfo *),
516   ModifyImage(Image **,ExceptionInfo *),
517   ResetImagePage(Image *,const char *),
518   SeparateImageChannel(Image *,const ChannelType),
519   SetImageAlphaChannel(Image *,const AlphaChannelType),
520   SetImageBackgroundColor(Image *),
521   SetImageClipMask(Image *,const Image *),
522   SetImageExtent(Image *,const unsigned long,const unsigned long),
523   SetImageInfo(ImageInfo *,const MagickBooleanType,ExceptionInfo *),
524   SetImageMask(Image *,const Image *),
525   SetImageOpacity(Image *,const Quantum),
526   SetImageStorageClass(Image *,const ClassType),
527   SetImageType(Image *,const ImageType),
528   StripImage(Image *),
529   SyncImage(Image *),
530   SyncImageSettings(const ImageInfo *,Image *),
531   SyncImagesSettings(ImageInfo *,Image *);
532
533 extern MagickExport size_t
534   InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *);
535
536 extern MagickExport VirtualPixelMethod
537   GetImageVirtualPixelMethod(const Image *),
538   SetImageVirtualPixelMethod(const Image *,const VirtualPixelMethod);
539
540 extern MagickExport void
541   AcquireNextImage(const ImageInfo *,Image *),
542   DestroyImagePixels(Image *),
543   DisassociateImageStream(Image *),
544   GetImageException(Image *,ExceptionInfo *),
545   GetImageInfo(ImageInfo *),
546   SetImageInfoBlob(ImageInfo *,const void *,const size_t),
547   SetImageInfoFile(ImageInfo *,FILE *);
548
549 #if defined(__cplusplus) || defined(c_plusplus)
550 }
551 #endif
552
553 #endif