~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/base/imagemagick/magick/magick_type.inc

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
  Copyright 1999-2005 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
  ImageMagick structure members.
 
17
 
 
18
  NOTE: This is a simplifyed version of magick/magick-type.h
 
19
}
 
20
 
 
21
const MaxTextExtent = 4096;
 
22
 
 
23
const
 
24
  MagickFalse = 0;
 
25
  MagickTrue = 1;
 
26
 
 
27
type
 
28
  MagickBooleanType = Byte;
 
29
 
 
30
  PMagickBooleanType = ^MagickBooleanType;
 
31
 
 
32
//#include "magick/semaphore.h"
 
33
 
 
34
{
 
35
  The Quantum Depth was fixed at 16 to make the code simpler
 
36
 
 
37
  In the future there is the possibility to go to the c bindings
 
38
 and implement the variable QuantumDepth here
 
39
}
 
40
const
 
41
  QuantumDepth = 16;
 
42
 
 
43
{$define QuantumLeap}
 
44
 
 
45
const
 
46
  MagickEpsilon = 1.0E-10;
 
47
  MaxColormapSize = 65536;
 
48
  MaxMap = 65535;
 
49
  QuantumFormat = '%u';
 
50
  QuantumRange = 65535;
 
51
 
 
52
type
 
53
  MagickRealType = double;
 
54
  Quantum = Word;
 
55
 
 
56
{
 
57
  Type declarations.
 
58
}
 
59
type
 
60
  MagickStatusType = Word;
 
61
  MagickOffsetType = Int64;
 
62
  MagickSizeType = Int64;
 
63
 
 
64
const
 
65
  UndefinedChannel = 0;
 
66
  RedChannel = $0001;
 
67
  GrayChannel = $0001;
 
68
  CyanChannel = $0001;
 
69
  GreenChannel = $0002;
 
70
  MagentaChannel = $0002;
 
71
  BlueChannel = $0004;
 
72
  YellowChannel = $0004;
 
73
  AlphaChannel = $0008;
 
74
  OpacityChannel = $0008;
 
75
  MatteChannel = $0008;  // deprecated
 
76
  BlackChannel = $0020;
 
77
  IndexChannel = $0020;
 
78
  AllChannels = $ff;
 
79
  
 
80
type
 
81
  ChannelType = Byte;
 
82
 
 
83
  PChannelType = ^ChannelType;
 
84
 
 
85
type
 
86
 ClassType = (
 
87
  UndefinedClass,
 
88
  DirectClass,
 
89
  PseudoClass
 
90
 );
 
91
 
 
92
  PClassType = ^ClassType;
 
93
 
 
94
type
 
95
 ColorspaceType = (
 
96
  UndefinedColorspace,
 
97
  RGBColorspace,
 
98
  GRAYColorspace,
 
99
  TransparentColorspace,
 
100
  OHTAColorspace,
 
101
  LABColorspace,
 
102
  XYZColorspace,
 
103
  YCbCrColorspace,
 
104
  YCCColorspace,
 
105
  YIQColorspace,
 
106
  YPbPrColorspace,
 
107
  YUVColorspace,
 
108
  CMYKColorspace,
 
109
  sRGBColorspace,
 
110
  HSBColorspace,
 
111
  HSLColorspace,
 
112
  HWBColorspace,
 
113
  Rec601LumaColorspace,
 
114
  Rec709LumaColorspace,
 
115
  LogColorspace
 
116
 );
 
117
 
 
118
  PColorspaceType = ^ColorspaceType;
 
119
 
 
120
type
 
121
 CompositeOperator = (
 
122
  UndefinedCompositeOp,
 
123
  NoCompositeOp,
 
124
  AddCompositeOp,
 
125
  AtopCompositeOp,
 
126
  BlendCompositeOp,
 
127
  BumpmapCompositeOp,
 
128
  ClearCompositeOp,
 
129
  ColorBurnCompositeOp,
 
130
  ColorDodgeCompositeOp,
 
131
  ColorizeCompositeOp,
 
132
  CopyBlackCompositeOp,
 
133
  CopyBlueCompositeOp,
 
134
  CopyCompositeOp,
 
135
  CopyCyanCompositeOp,
 
136
  CopyGreenCompositeOp,
 
137
  CopyMagentaCompositeOp,
 
138
  CopyOpacityCompositeOp,
 
139
  CopyRedCompositeOp,
 
140
  CopyYellowCompositeOp,
 
141
  DarkenCompositeOp,
 
142
  DstAtopCompositeOp,
 
143
  DstCompositeOp,
 
144
  DstInCompositeOp,
 
145
  DstOutCompositeOp,
 
146
  DstOverCompositeOp,
 
147
  DifferenceCompositeOp,
 
148
  DisplaceCompositeOp,
 
149
  DissolveCompositeOp,
 
150
  ExclusionCompositeOp,
 
151
  HardLightCompositeOp,
 
152
  HueCompositeOp,
 
153
  InCompositeOp,
 
154
  LightenCompositeOp,
 
155
  LuminizeCompositeOp,
 
156
  MinusCompositeOp,
 
157
  ModulateCompositeOp,
 
158
  MultiplyCompositeOp,
 
159
  OutCompositeOp,
 
160
  OverCompositeOp,
 
161
  OverlayCompositeOp,
 
162
  PlusCompositeOp,
 
163
  ReplaceCompositeOp,
 
164
  SaturateCompositeOp,
 
165
  ScreenCompositeOp,
 
166
  SoftLightCompositeOp,
 
167
  SrcAtopCompositeOp,
 
168
  SrcCompositeOp,
 
169
  SrcInCompositeOp,
 
170
  SrcOutCompositeOp,
 
171
  SrcOverCompositeOp,
 
172
  SubtractCompositeOp,
 
173
  ThresholdCompositeOp,
 
174
  XorCompositeOp
 
175
 );
 
176
 
 
177
  PCompositeOperator = ^CompositeOperator;
 
178
 
 
179
type
 
180
 CompressionType = (
 
181
  UndefinedCompression,
 
182
  NoCompression,
 
183
  BZipCompression,
 
184
  FaxCompression,
 
185
  Group4Compression,
 
186
  JPEGCompression,
 
187
  JPEG2000Compression,
 
188
  LosslessJPEGCompression,
 
189
  LZWCompression,
 
190
  RLECompression,
 
191
  ZipCompression
 
192
 );
 
193
 
 
194
  PCompressionType = ^CompressionType;
 
195
  
 
196
const
 
197
  UnrecognizedDispose = 0;
 
198
  UndefinedDispose = 0;
 
199
  NoneDispose = 1;
 
200
  BackgroundDispose = 2;
 
201
  PreviousDispose = 3;
 
202
 
 
203
type
 
204
  DisposeType = Byte;
 
205
 
 
206
  PDisposeType = ^DisposeType;
 
207
  
 
208
type
 
209
 EndianType = (
 
210
  UndefinedEndian,
 
211
  LSBEndian,
 
212
  MSBEndian
 
213
 );
 
214
 
 
215
  PEndianType = ^EndianType;
 
216
 
 
217
const
 
218
  UndefinedException = 0;
 
219
  WarningException = 300;
 
220
  ResourceLimitWarning = 300;
 
221
  TypeWarning = 305;
 
222
  OptionWarning = 310;
 
223
  DelegateWarning = 315;
 
224
  MissingDelegateWarning = 320;
 
225
  CorruptImageWarning = 325;
 
226
  FileOpenWarning = 330;
 
227
  BlobWarning = 335;
 
228
  StreamWarning = 340;
 
229
  CacheWarning = 345;
 
230
  CoderWarning = 350;
 
231
  ModuleWarning = 355;
 
232
  DrawWarning = 360;
 
233
  ImageWarning = 365;
 
234
  WandWarning = 370;
 
235
  XServerWarning = 380;
 
236
  MonitorWarning = 385;
 
237
  RegistryWarning = 390;
 
238
  ConfigureWarning = 395;
 
239
  ErrorException = 400;
 
240
  ResourceLimitError = 400;
 
241
  TypeError = 405;
 
242
  OptionError = 410;
 
243
  DelegateError = 415;
 
244
  MissingDelegateError = 420;
 
245
  CorruptImageError = 425;
 
246
  FileOpenError = 430;
 
247
  BlobError = 435;
 
248
  StreamError = 440;
 
249
  CacheError = 445;
 
250
  CoderError = 450;
 
251
  ModuleError = 455;
 
252
  DrawError = 460;
 
253
  ImageError = 465;
 
254
  WandError = 470;
 
255
  XServerError = 480;
 
256
  MonitorError = 485;
 
257
  RegistryError = 490;
 
258
  ConfigureError = 495;
 
259
  FatalErrorException = 700;
 
260
  ResourceLimitFatalError = 700;
 
261
  TypeFatalError = 705;
 
262
  OptionFatalError = 710;
 
263
  DelegateFatalError = 715;
 
264
  MissingDelegateFatalError = 720;
 
265
  CorruptImageFatalError = 725;
 
266
  FileOpenFatalError = 730;
 
267
  BlobFatalError = 735;
 
268
  StreamFatalError = 740;
 
269
  CacheFatalError = 745;
 
270
  CoderFatalError = 750;
 
271
  ModuleFatalError = 755;
 
272
  DrawFatalError = 760;
 
273
  ImageFatalError = 765;
 
274
  WandFatalError = 770;
 
275
  XServerFatalError = 780;
 
276
  MonitorFatalError = 785;
 
277
  RegistryFatalError = 790;
 
278
  ConfigureFatalError = 795;
 
279
  
 
280
type
 
281
  ExceptionType = Word;
 
282
  
 
283
  PExceptionType = ^ExceptionType;
 
284
 
 
285
type
 
286
 FilterTypes = (
 
287
  UndefinedFilter,
 
288
  PointFilter,
 
289
  BoxFilter,
 
290
  TriangleFilter,
 
291
  HermiteFilter,
 
292
  HanningFilter,
 
293
  HammingFilter,
 
294
  BlackmanFilter,
 
295
  GaussianFilter,
 
296
  QuadraticFilter,
 
297
  CubicFilter,
 
298
  CatromFilter,
 
299
  MitchellFilter,
 
300
  LanczosFilter,
 
301
  BesselFilter,
 
302
  SincFilter
 
303
 );
 
304
 
 
305
  PFilterTypes = ^FilterTypes;
 
306
 
 
307
const
 
308
  UndefinedGravity = 0;
 
309
  ForgetGravity = 0;
 
310
  NorthWestGravity = 1;
 
311
  NorthGravity = 2;
 
312
  NorthEastGravity = 3;
 
313
  WestGravity = 4;
 
314
  CenterGravity = 5;
 
315
  EastGravity = 6;
 
316
  SouthWestGravity = 7;
 
317
  SouthGravity = 8;
 
318
  SouthEastGravity = 9;
 
319
  StaticGravity = 10;
 
320
 
 
321
type
 
322
  GravityType = Byte;
 
323
 
 
324
  PGravityType = ^GravityType;
 
325
 
 
326
type ImageType = (
 
327
  UndefinedType,
 
328
  BilevelType,
 
329
  GrayscaleType,
 
330
  GrayscaleMatteType,
 
331
  PaletteType,
 
332
  PaletteMatteType,
 
333
  TrueColorType,
 
334
  TrueColorMatteType,
 
335
  ColorSeparationType,
 
336
  ColorSeparationMatteType,
 
337
  OptimizeType
 
338
 );
 
339
 
 
340
  PImageType = ^ImageType;
 
341
 
 
342
type
 
343
 InterlaceType = (
 
344
  UndefinedInterlace,
 
345
  NoInterlace,
 
346
  LineInterlace,
 
347
  PlaneInterlace,
 
348
  PartitionInterlace
 
349
 );
 
350
 
 
351
  PInterlaceType = ^InterlaceType;
 
352
 
 
353
type
 
354
 OrientationType = (
 
355
  UndefinedOrientation,
 
356
  TopLeftOrientation,
 
357
  TopRightOrientation,
 
358
  BottomRightOrientation,
 
359
  BottomLeftOrientation,
 
360
  LeftTopOrientation,
 
361
  RightTopOrientation,
 
362
  RightBottomOrientation,
 
363
  LeftBottomOrientation
 
364
 );
 
365
 
 
366
  POrientationType = ^OrientationType;
 
367
 
 
368
type PreviewType = (
 
369
  UndefinedPreview,
 
370
  RotatePreview,
 
371
  ShearPreview,
 
372
  RollPreview,
 
373
  HuePreview,
 
374
  SaturationPreview,
 
375
  BrightnessPreview,
 
376
  GammaPreview,
 
377
  SpiffPreview,
 
378
  DullPreview,
 
379
  GrayscalePreview,
 
380
  QuantizePreview,
 
381
  DespecklePreview,
 
382
  ReduceNoisePreview,
 
383
  AddNoisePreview,
 
384
  SharpenPreview,
 
385
  BlurPreview,
 
386
  ThresholdPreview,
 
387
  EdgeDetectPreview,
 
388
  SpreadPreview,
 
389
  SolarizePreview,
 
390
  ShadePreview,
 
391
  RaisePreview,
 
392
  SegmentPreview,
 
393
  SwirlPreview,
 
394
  ImplodePreview,
 
395
  WavePreview,
 
396
  OilPaintPreview,
 
397
  CharcoalDrawingPreview,
 
398
  JPEGPreview
 
399
 );
 
400
 
 
401
  PPreviewType = ^PreviewType;
 
402
 
 
403
type RenderingIntent = (
 
404
  UndefinedIntent,
 
405
  SaturationIntent,
 
406
  PerceptualIntent,
 
407
  AbsoluteIntent,
 
408
  RelativeIntent
 
409
 );
 
410
 
 
411
  PRenderingIntent = ^RenderingIntent;
 
412
 
 
413
type ResolutionType = (
 
414
  UndefinedResolution,
 
415
  PixelsPerInchResolution,
 
416
  PixelsPerCentimeterResolution
 
417
 );
 
418
 
 
419
  PResolutionType = ^ResolutionType;
 
420
 
 
421
type TimerState = (
 
422
  UndefinedTimerState,
 
423
  StoppedTimerState,
 
424
  RunningTimerState
 
425
 );
 
426
 
 
427
  PTimerState = ^TimerState;
 
428
 
 
429
type
 
430
  AffineMatrix = record
 
431
    sx, rx, ry, sy, tx, ty: double;
 
432
  end;
 
433
  
 
434
  PAffineMatrix = ^AffineMatrix;
 
435
 
 
436
type
 
437
 IndexPacket = Quantum;
 
438
 
 
439
type
 
440
  PixelPacket = record
 
441
{$ifdef WORDS_BIGENDIAN}
 
442
   red, green, blue, opacity: Quantum;
 
443
{$else}
 
444
   blue, green, red, opacity: Quantum;
 
445
{$endif}
 
446
  end;
 
447
  
 
448
  PPixelPacket = ^PixelPacket;
 
449
 
 
450
type
 
451
  ColorPacket = record
 
452
   pixel: PixelPacket;
 
453
   index: IndexPacket;
 
454
   count: Cardinal;
 
455
  end;
 
456
  
 
457
  PColorPacket = ^ColorPacket;
 
458
 
 
459
type
 
460
  ErrorInfo = record
 
461
   mean_error_per_pixel, normalized_mean_error, normalized_maximum_error: double;
 
462
  end;
 
463
 
 
464
type
 
465
  PrimaryInfo = record
 
466
   x, y, z: double;
 
467
  end;
 
468
 
 
469
type 
 
470
  ProfileInfo = record
 
471
   name: PChar;
 
472
   length: Integer;
 
473
   info: PChar;
 
474
   signature: Cardinal;
 
475
  end;
 
476
  
 
477
  PProfileInfo = ^ProfileInfo;
 
478
 
 
479
type 
 
480
  RectangleInfo = record
 
481
   width, height: Cardinal;
 
482
   x, y: Cardinal;
 
483
  end;
 
484
 
 
485
type
 
486
  SegmentInfo = record
 
487
   x1, y1, x2, y2: double;
 
488
  end;
 
489
 
 
490
type
 
491
  Timer = record
 
492
   start, stop, total: double;
 
493
  end;
 
494
  
 
495
  PTimer = ^Timer;
 
496
 
 
497
type
 
498
  TimerInfo = record
 
499
   user, elapsed: Timer;
 
500
   state: TimerState;
 
501
   signature: Cardinal;
 
502
  end;
 
503
  
 
504
  PTimerInfo = ^TimerInfo;
 
505
 
 
506
type
 
507
  ChromaticityInfo = record
 
508
   red_primary, green_primary, blue_primary, white_point: PrimaryInfo;
 
509
 end;
 
510
 
 
511
type
 
512
  ExceptionInfo = record
 
513
   severity: ExceptionType;
 
514
   error_number: Shortint;
 
515
   reason, description: PChar;
 
516
   signature: Cardinal;
 
517
  end;
 
518
  
 
519
  PExceptionInfo = ^ExceptionInfo;
 
520
 
 
521
//typedef struct _Ascii85Info _Ascii85Info_;
 
522
 
 
523
//typedef struct _BlobInfo _BlobInfo_;
 
524
 
 
525
type
 
526
  MagickProgressMonitor = function (const str: PChar; const para: MagickOffsetType;
 
527
   const sizetype: MagickSizeType; param: Pointer): PMagickBooleanType;
 
528
 
 
529
type
 
530
  Image = record
 
531
   storage_class: ClassType;
 
532
   colorspace: ColorspaceType;
 
533
   compression: CompressionType;
 
534
   quality: Cardinal;
 
535
   orientation: OrientationType;
 
536
   taint, matte: MagickBooleanType;
 
537
   columns, rows, depth, colors: Cardinal;
 
538
   colormap: PPixelPacket;
 
539
   background_color, border_color, matte_color: PixelPacket;
 
540
   gamma: double;
 
541
   chromaticity: ChromaticityInfo;
 
542
   rendering_intent: RenderingIntent;
 
543
   profiles: Pointer;
 
544
   units: ResolutionType;
 
545
   montage, directory, geometry: PChar;
 
546
   offset: Integer;
 
547
   x_resolution, y_resolution: double;
 
548
   page, extract_info, tile_info: RectangleInfo;  // deprecated
 
549
   bias, blur, fuzz: double;
 
550
   filter: FilterTypes;
 
551
   interlace: InterlaceType;
 
552
   endian: EndianType;
 
553
   gravity: GravityType;
 
554
   compose: CompositeOperator;
 
555
   dispose: DisposeType;
 
556
   clip_mask: Pointer; // PImage
 
557
   scene, delay, iterations, total_colors: Cardinal;
 
558
   start_loop: Integer;
 
559
   error: ErrorInfo;
 
560
   timer: TimerInfo;
 
561
   progress_monitor: MagickProgressMonitor;
 
562
   client_data: Pointer;
 
563
   cache: Pointer;
 
564
   attributes: Pointer;
 
565
   ascii85: Pointer; //_Ascii85Info_
 
566
   blob: Pointer; // _BlobInfo_
 
567
   filename, magick_filename, magick: array[1..MaxTextExtent] of char;
 
568
   magick_columns, magick_rows: Integer;
 
569
   exception: ExceptionInfo;
 
570
   debug: MagickBooleanType;
 
571
   reference_count: Integer;
 
572
   semaphore: Pointer; //PSemaphoreInfo;
 
573
   color_profile, iptc_profile: ProfileInfo;
 
574
   generic_profile: PProfileInfo;
 
575
   generic_profiles: Cardinal;  // this & ProfileInfo is deprecated
 
576
   signature: Cardinal;
 
577
   previous, list, next: Pointer;
 
578
{  struct _Image
 
579
    *previous,
 
580
    *list,
 
581
    *next;}
 
582
 end;
 
583
 
 
584
 PImage = ^Image;
 
585
 
 
586
//type
 
587
//  size_t = PStreamHandler(procedure (const image: PImage;
 
588
//   const param: Pointer; const) );
 
589
 
 
590
type
 
591
  ImageInfo = record
 
592
   compression: CompressionType;
 
593
   orientation: OrientationType;
 
594
   temporary, adjoin, affirm, antialias: MagickBooleanType;
 
595
   size, extract, page, scenes: PChar;
 
596
   scene, number_scenes, depth: Cardinal;
 
597
   interlace: InterlaceType;
 
598
   endian: EndianType;
 
599
   units: ResolutionType;
 
600
   quality: Cardinal;
 
601
   sampling_factor, server_name, font, texture, density: PChar;
 
602
   pointsize, fuzz: double;
 
603
   background_color, border_color, matte_color: PixelPacket;
 
604
   dither, monochrome: MagickBooleanType;
 
605
   colors: Cardinal;
 
606
   colorspace: ColorspaceType;
 
607
   type_: ImageType ;
 
608
   preview_type: PreviewType;
 
609
   group: Integer;
 
610
   ping, verbose: MagickBooleanType;
 
611
   view, authenticate: PChar;
 
612
   channel: ChannelType;
 
613
   attributes: PImage;
 
614
   options: Pointer;
 
615
   progress_monitor: MagickProgressMonitor;
 
616
   client_data, cache: Pointer;
 
617
   stream: Cardinal; //StreamHandler;
 
618
   file_: Pointer; // *file
 
619
   blob: Pointer;
 
620
   length: Integer;
 
621
   magick, unique, zero, filename: array[1..MaxTextExtent] of char;
 
622
   debug: MagickBooleanType;
 
623
 
 
624
  {
 
625
    Deprecated.
 
626
  }
 
627
   tile: PChar;
 
628
   subimage, subrange: Cardinal;
 
629
   pen: PixelPacket;
 
630
   signature: Cardinal;
 
631
 end;
 
632
 
 
633
  PImageInfo = ^ImageInfo;
 
634
 
 
635