cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
cristy | 45ef08f | 2012-12-07 13:13:34 +0000 | [diff] [blame] | 2 | Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3 | dedicated to making software imaging solutions freely available. |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 4 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 5 | You may not use this file except in compliance with the License. |
| 6 | obtain a copy of the License at |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 7 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 8 | http://www.imagemagick.org/script/license.php |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 9 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 | |
cristy | f697adb | 2013-01-11 12:20:05 +0000 | [diff] [blame] | 25 | #include "MagickCore/color.h" |
| 26 | #include "MagickCore/pixel.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 27 | |
cristy | 288a353 | 2012-08-28 00:19:44 +0000 | [diff] [blame] | 28 | #define OpaqueAlpha ((Quantum) QuantumRange) |
| 29 | #define TransparentAlpha ((Quantum) 0) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 30 | |
| 31 | typedef enum |
| 32 | { |
| 33 | UndefinedAlphaChannel, |
| 34 | ActivateAlphaChannel, |
| 35 | BackgroundAlphaChannel, |
| 36 | CopyAlphaChannel, |
| 37 | DeactivateAlphaChannel, |
| 38 | ExtractAlphaChannel, |
| 39 | OpaqueAlphaChannel, |
cristy | 6180838 | 2012-01-30 01:24:49 +0000 | [diff] [blame] | 40 | RemoveAlphaChannel, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 41 | SetAlphaChannel, |
| 42 | ShapeAlphaChannel, |
cristy | 6180838 | 2012-01-30 01:24:49 +0000 | [diff] [blame] | 43 | TransparentAlphaChannel |
cristy | b15b06c | 2012-08-28 11:36:48 +0000 | [diff] [blame] | 44 | } AlphaChannelOption; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 45 | |
| 46 | typedef enum |
| 47 | { |
cristy | 5f1c1ff | 2010-12-23 21:38:06 +0000 | [diff] [blame] | 48 | UndefinedType, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 49 | BilevelType, |
| 50 | GrayscaleType, |
| 51 | GrayscaleMatteType, |
| 52 | PaletteType, |
| 53 | PaletteMatteType, |
| 54 | TrueColorType, |
| 55 | TrueColorMatteType, |
| 56 | ColorSeparationType, |
| 57 | ColorSeparationMatteType, |
| 58 | OptimizeType, |
| 59 | PaletteBilevelMatteType |
| 60 | } ImageType; |
| 61 | |
| 62 | typedef enum |
| 63 | { |
| 64 | UndefinedInterlace, |
| 65 | NoInterlace, |
| 66 | LineInterlace, |
| 67 | PlaneInterlace, |
| 68 | PartitionInterlace, |
| 69 | GIFInterlace, |
| 70 | JPEGInterlace, |
| 71 | PNGInterlace |
| 72 | } InterlaceType; |
| 73 | |
| 74 | typedef enum |
| 75 | { |
| 76 | UndefinedOrientation, |
| 77 | TopLeftOrientation, |
| 78 | TopRightOrientation, |
| 79 | BottomRightOrientation, |
| 80 | BottomLeftOrientation, |
| 81 | LeftTopOrientation, |
| 82 | RightTopOrientation, |
| 83 | RightBottomOrientation, |
| 84 | LeftBottomOrientation |
| 85 | } OrientationType; |
| 86 | |
| 87 | typedef enum |
| 88 | { |
| 89 | UndefinedResolution, |
| 90 | PixelsPerInchResolution, |
| 91 | PixelsPerCentimeterResolution |
| 92 | } ResolutionType; |
| 93 | |
| 94 | typedef struct _PrimaryInfo |
| 95 | { |
| 96 | double |
| 97 | x, |
| 98 | y, |
| 99 | z; |
| 100 | } PrimaryInfo; |
| 101 | |
| 102 | typedef struct _SegmentInfo |
| 103 | { |
| 104 | double |
| 105 | x1, |
| 106 | y1, |
| 107 | x2, |
| 108 | y2; |
| 109 | } SegmentInfo; |
| 110 | |
| 111 | typedef enum |
| 112 | { |
| 113 | UndefinedTransmitType, |
| 114 | FileTransmitType, |
| 115 | BlobTransmitType, |
| 116 | StreamTransmitType, |
| 117 | ImageTransmitType |
| 118 | } TransmitType; |
| 119 | |
| 120 | typedef struct _ChromaticityInfo |
| 121 | { |
| 122 | PrimaryInfo |
| 123 | red_primary, |
| 124 | green_primary, |
| 125 | blue_primary, |
| 126 | white_point; |
| 127 | } ChromaticityInfo; |
| 128 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 129 | #include "MagickCore/blob.h" |
| 130 | #include "MagickCore/colorspace.h" |
| 131 | #include "MagickCore/cache-view.h" |
| 132 | #include "MagickCore/color.h" |
| 133 | #include "MagickCore/composite.h" |
| 134 | #include "MagickCore/compress.h" |
| 135 | #include "MagickCore/effect.h" |
| 136 | #include "MagickCore/geometry.h" |
| 137 | #include "MagickCore/layer.h" |
| 138 | #include "MagickCore/locale_.h" |
| 139 | #include "MagickCore/monitor.h" |
| 140 | #include "MagickCore/pixel.h" |
| 141 | #include "MagickCore/profile.h" |
| 142 | #include "MagickCore/quantum.h" |
| 143 | #include "MagickCore/resample.h" |
| 144 | #include "MagickCore/resize.h" |
| 145 | #include "MagickCore/semaphore.h" |
| 146 | #include "MagickCore/stream.h" |
| 147 | #include "MagickCore/timer.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 148 | |
| 149 | struct _Image |
| 150 | { |
| 151 | ClassType |
| 152 | storage_class; |
| 153 | |
| 154 | ColorspaceType |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 155 | colorspace; /* colorspace of image data */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 156 | |
| 157 | CompressionType |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 158 | compression; /* compression of image when read/write */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 159 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 160 | size_t |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 161 | quality; /* compression quality setting, meaning varies */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 162 | |
| 163 | OrientationType |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 164 | orientation; /* photo orientation of image */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 165 | |
| 166 | MagickBooleanType |
cristy | 8a46d82 | 2012-08-28 23:32:39 +0000 | [diff] [blame] | 167 | taint; /* has image been modified since reading */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 168 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 169 | size_t |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 170 | columns, /* physical size of image */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 171 | rows, |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 172 | depth, /* depth of image on read/write */ |
| 173 | colors; /* Size of color table, or actual color count */ |
| 174 | /* Only valid if image is not DirectClass */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 175 | |
cristy | 101ab70 | 2011-10-13 13:06:32 +0000 | [diff] [blame] | 176 | PixelInfo |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 177 | *colormap, |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 178 | background_color, /* current background color attribute */ |
| 179 | border_color, /* current bordercolor attribute */ |
| 180 | matte_color, /* current mattecolor attribute */ |
| 181 | transparent_color; /* color for 'transparent' color index in GIF */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 182 | |
| 183 | double |
| 184 | gamma; |
| 185 | |
| 186 | ChromaticityInfo |
| 187 | chromaticity; |
| 188 | |
| 189 | RenderingIntent |
| 190 | rendering_intent; |
| 191 | |
| 192 | void |
| 193 | *profiles; |
| 194 | |
| 195 | ResolutionType |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 196 | units; /* resolution/density ppi or ppc */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 197 | |
| 198 | char |
| 199 | *montage, |
| 200 | *directory, |
| 201 | *geometry; |
| 202 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 203 | ssize_t |
anthony | 30b912a | 2012-03-22 01:20:28 +0000 | [diff] [blame] | 204 | offset; /* ??? */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 205 | |
cristy | 2a11bef | 2011-10-28 18:33:11 +0000 | [diff] [blame] | 206 | PointInfo |
| 207 | resolution; /* image resolution/density */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 208 | |
| 209 | RectangleInfo |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 210 | page, /* virtual canvas size and offset of image */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 211 | extract_info; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 212 | |
| 213 | double |
anthony | e95d3f0 | 2011-10-12 10:58:48 +0000 | [diff] [blame] | 214 | fuzz; /* current color fuzz attribute - make image_info */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 215 | |
| 216 | FilterTypes |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 217 | filter; /* resize/distort filter to apply */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 218 | |
cristy | 70e9f68 | 2013-03-12 22:31:22 +0000 | [diff] [blame] | 219 | PixelIntensityMethod |
| 220 | intensity; /* method to generate an intensity value from a pixel */ |
| 221 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 222 | InterlaceType |
| 223 | interlace; |
| 224 | |
| 225 | EndianType |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 226 | endian; /* raw data integer ordering on read/write */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 227 | |
| 228 | GravityType |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 229 | gravity; /* Gravity attribute for positioning in image */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 230 | |
| 231 | CompositeOperator |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 232 | compose; /* alpha composition method for layered images */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 233 | |
| 234 | DisposeType |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 235 | dispose; /* GIF animation disposal method */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 236 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 237 | size_t |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 238 | scene, /* index of image in multi-image file */ |
| 239 | delay; /* Animation delay time */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 240 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 241 | ssize_t |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 242 | ticks_per_second; /* units for delay time, default 100 for GIF */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 243 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 244 | size_t |
anthony | 5f78bca | 2012-10-05 06:51:00 +0000 | [diff] [blame] | 245 | iterations, /* number of interations for GIF animations */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 246 | total_colors; |
| 247 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 248 | ssize_t |
anthony | 30b912a | 2012-03-22 01:20:28 +0000 | [diff] [blame] | 249 | start_loop; /* ??? */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 250 | |
cristy | 5c4e258 | 2011-09-11 19:21:03 +0000 | [diff] [blame] | 251 | PixelInterpolateMethod |
anthony | 1e4df87 | 2011-03-19 14:10:59 +0000 | [diff] [blame] | 252 | interpolate; /* Interpolation of color for between pixel lookups */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 253 | |
| 254 | MagickBooleanType |
| 255 | black_point_compensation; |
| 256 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 257 | RectangleInfo |
| 258 | tile_offset; |
| 259 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 260 | ImageType |
| 261 | type; |
| 262 | |
| 263 | MagickBooleanType |
anthony | ad98c29 | 2011-09-29 10:43:26 +0000 | [diff] [blame] | 264 | dither; /* dithering on/off */ |
cristy | 81b8ce5 | 2010-02-05 01:53:17 +0000 | [diff] [blame] | 265 | |
| 266 | MagickSizeType |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 267 | extent; /* Size of image read from disk */ |
cristy | 7372451 | 2010-04-12 14:43:14 +0000 | [diff] [blame] | 268 | |
| 269 | MagickBooleanType |
anthony | 30b912a | 2012-03-22 01:20:28 +0000 | [diff] [blame] | 270 | ping; /* no image data read, just attributes */ |
cristy | 0d26717 | 2011-04-25 20:13:48 +0000 | [diff] [blame] | 271 | |
cristy | 10a6c61 | 2012-01-29 21:41:05 +0000 | [diff] [blame] | 272 | MagickBooleanType |
cristy | 883fde1 | 2013-04-08 00:50:13 +0000 | [diff] [blame^] | 273 | read_mask, |
| 274 | write_mask; |
cristy | 10a6c61 | 2012-01-29 21:41:05 +0000 | [diff] [blame] | 275 | |
cristy | 2485594 | 2012-08-28 11:25:09 +0000 | [diff] [blame] | 276 | PixelTrait |
cristy | 8a46d82 | 2012-08-28 23:32:39 +0000 | [diff] [blame] | 277 | alpha_trait; /* is transparency channel defined and active */ |
cristy | 288a353 | 2012-08-28 00:19:44 +0000 | [diff] [blame] | 278 | |
cristy | 0d26717 | 2011-04-25 20:13:48 +0000 | [diff] [blame] | 279 | size_t |
cristy | ed23157 | 2011-07-14 02:18:59 +0000 | [diff] [blame] | 280 | number_channels, |
cristy | b3a73b5 | 2011-07-26 01:34:43 +0000 | [diff] [blame] | 281 | number_meta_channels, |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 282 | metacontent_extent; |
| 283 | |
cristy | bd5a96c | 2011-08-21 00:04:26 +0000 | [diff] [blame] | 284 | ChannelType |
anthony | ad98c29 | 2011-09-29 10:43:26 +0000 | [diff] [blame] | 285 | channel_mask; |
cristy | 490408a | 2011-07-07 14:42:05 +0000 | [diff] [blame] | 286 | |
cristy | ed23157 | 2011-07-14 02:18:59 +0000 | [diff] [blame] | 287 | PixelChannelMap |
cristy | bd5a96c | 2011-08-21 00:04:26 +0000 | [diff] [blame] | 288 | *channel_map; |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 289 | |
| 290 | void |
| 291 | *cache; |
| 292 | |
| 293 | ErrorInfo |
| 294 | error; |
| 295 | |
| 296 | TimerInfo |
| 297 | timer; |
| 298 | |
| 299 | MagickProgressMonitor |
| 300 | progress_monitor; |
| 301 | |
| 302 | void |
| 303 | *client_data; |
| 304 | |
| 305 | Ascii85Info |
| 306 | *ascii85; |
| 307 | |
| 308 | ProfileInfo |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 309 | *generic_profile; |
| 310 | |
cristy | bd686c6 | 2013-02-03 19:01:05 +0000 | [diff] [blame] | 311 | void |
| 312 | *properties, /* general settings, to save with image */ |
| 313 | *artifacts; /* general operational/coder settings, not saved */ |
| 314 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 315 | char |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 316 | filename[MaxTextExtent], /* images input filename */ |
| 317 | magick_filename[MaxTextExtent], /* given image filename (with read mods) */ |
| 318 | magick[MaxTextExtent]; /* images file format (file magic) */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 319 | |
| 320 | size_t |
anthony | 30b912a | 2012-03-22 01:20:28 +0000 | [diff] [blame] | 321 | magick_columns, /* size of image when read/created */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 322 | magick_rows; |
| 323 | |
| 324 | BlobInfo |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 325 | *blob; /* image file as in-memory string of 'extent' */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 326 | |
cristy | bd686c6 | 2013-02-03 19:01:05 +0000 | [diff] [blame] | 327 | time_t |
| 328 | timestamp; |
| 329 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 330 | MagickBooleanType |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 331 | debug; /* debug output attribute */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 332 | |
| 333 | volatile ssize_t |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 334 | reference_count; /* image data sharing memory management */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 335 | |
| 336 | SemaphoreInfo |
| 337 | *semaphore; |
| 338 | |
cristy | 027ff40 | 2012-11-11 20:43:03 +0000 | [diff] [blame] | 339 | const struct _ImageInfo |
anthony | 5f78bca | 2012-10-05 06:51:00 +0000 | [diff] [blame] | 340 | *image_info; /* (Optional) Image belongs to this ImageInfo 'list' |
| 341 | * For access to 'global options' when no per-image |
| 342 | * attribute, properity, or artifact has been set. |
| 343 | * It may be set or unset as needed, but never freed. |
| 344 | */ |
anthony | 007bad3 | 2012-07-28 10:52:03 +0000 | [diff] [blame] | 345 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 346 | struct _Image |
anthony | 007bad3 | 2012-07-28 10:52:03 +0000 | [diff] [blame] | 347 | *list, /* Undo/Redo image processing list (for display) */ |
| 348 | *previous, /* Image list links */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 349 | *next; |
| 350 | |
| 351 | size_t |
| 352 | signature; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 353 | }; |
| 354 | |
anthony | 5f78bca | 2012-10-05 06:51:00 +0000 | [diff] [blame] | 355 | /* ImageInfo structure |
| 356 | * Stores an image list, as well as all global settings used by |
| 357 | * all images held, -- unless overridden for that specific image. |
| 358 | * See SyncImagesettings() which maps any global setting that always |
| 359 | * overrides specific image settings. |
| 360 | */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 361 | struct _ImageInfo |
| 362 | { |
| 363 | CompressionType |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 364 | compression; /* compression method when reading/saving image */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 365 | |
| 366 | OrientationType |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 367 | orientation; /* orientation setting */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 368 | |
| 369 | MagickBooleanType |
anthony | d5daafa | 2012-03-28 12:49:10 +0000 | [diff] [blame] | 370 | temporary, /* image file to be deleted after read "empemeral:" */ |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 371 | adjoin, /* save images to seperate scene files */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 372 | affirm, |
| 373 | antialias; |
| 374 | |
| 375 | char |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 376 | *size, /* image generation size */ |
| 377 | *extract, /* crop/resize string on image read */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 378 | *page, |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 379 | *scenes; /* scene numbers that is to be read in */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 380 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 381 | size_t |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 382 | scene, /* starting value for image save numbering */ |
| 383 | number_scenes, /* total number of images in list - for escapes */ |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 384 | depth; /* current read/save depth of images */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 385 | |
| 386 | InterlaceType |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 387 | interlace; /* interlace for image write */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 388 | |
| 389 | EndianType |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 390 | endian; /* integer endian order for raw image data */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 391 | |
| 392 | ResolutionType |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 393 | units; /* denisty pixels/inch or pixel/cm */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 394 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 395 | size_t |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 396 | quality; /* compression quality */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 397 | |
| 398 | char |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 399 | *sampling_factor, /* JPEG write sampling factor */ |
| 400 | *server_name, /* X windows server name - display/animate */ |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 401 | *font, /* DUP for draw_info */ |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 402 | *texture, /* montage/display background tile */ |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 403 | *density; /* DUP for image and draw_info */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 404 | |
| 405 | double |
cristy | 947cb4c | 2011-10-20 18:41:46 +0000 | [diff] [blame] | 406 | pointsize, |
anthony | e95d3f0 | 2011-10-12 10:58:48 +0000 | [diff] [blame] | 407 | fuzz; /* current color fuzz attribute */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 408 | |
cristy | 101ab70 | 2011-10-13 13:06:32 +0000 | [diff] [blame] | 409 | PixelInfo |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 410 | background_color, /* user set background color */ |
| 411 | border_color, /* user set border color */ |
| 412 | matte_color, /* matte (frame) color */ |
| 413 | transparent_color; /* color for transparent index in color tables */ |
| 414 | /* NB: fill color is only needed in draw_info! */ |
| 415 | /* the same for undercolor (for font drawing) */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 416 | |
| 417 | MagickBooleanType |
anthony | fd706f9 | 2012-01-19 04:22:02 +0000 | [diff] [blame] | 418 | dither, /* dither enable-disable */ |
| 419 | monochrome; /* read/write pcl,pdf,ps,xps as monocrome image */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 420 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 421 | ColorspaceType |
| 422 | colorspace; |
| 423 | |
anthony | 72feaa6 | 2012-01-17 06:46:23 +0000 | [diff] [blame] | 424 | CompositeOperator |
| 425 | compose; |
| 426 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 427 | ImageType |
| 428 | type; |
| 429 | |
| 430 | PreviewType |
| 431 | preview_type; |
| 432 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 433 | ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 434 | group; |
| 435 | |
| 436 | MagickBooleanType |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 437 | ping, /* fast read image attributes, not image data */ |
| 438 | verbose; /* verbose output enable/disable */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 439 | |
| 440 | char |
anthony | 1afdc7a | 2011-10-05 11:54:28 +0000 | [diff] [blame] | 441 | *view; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 442 | |
| 443 | ChannelType |
| 444 | channel; |
| 445 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 446 | void |
anthony | 5f78bca | 2012-10-05 06:51:00 +0000 | [diff] [blame] | 447 | *options; /* splay tree of global options */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 448 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 449 | void |
| 450 | *profile; |
| 451 | |
| 452 | MagickBooleanType |
| 453 | synchronize; |
| 454 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 455 | MagickProgressMonitor |
| 456 | progress_monitor; |
| 457 | |
| 458 | void |
| 459 | *client_data, |
| 460 | *cache; |
| 461 | |
| 462 | StreamHandler |
| 463 | stream; |
| 464 | |
| 465 | FILE |
| 466 | *file; |
| 467 | |
| 468 | void |
| 469 | *blob; |
| 470 | |
| 471 | size_t |
| 472 | length; |
| 473 | |
| 474 | char |
anthony | 8ea7983 | 2011-10-05 10:08:39 +0000 | [diff] [blame] | 475 | magick[MaxTextExtent], /* image file format (file magick) */ |
| 476 | unique[MaxTextExtent], /* unique tempory filename - delegates */ |
| 477 | zero[MaxTextExtent], /* unique filename ? - delegates */ |
| 478 | filename[MaxTextExtent]; /* filename when reading/writing image */ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 479 | |
| 480 | MagickBooleanType |
| 481 | debug; |
| 482 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 483 | size_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 484 | signature; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 485 | }; |
| 486 | |
cristy | cf1296e | 2012-08-26 23:40:49 +0000 | [diff] [blame] | 487 | extern MagickExport ChannelType |
| 488 | SetImageChannelMask(Image *,const ChannelType); |
| 489 | |
cristy | 8ea8122 | 2011-09-04 10:33:32 +0000 | [diff] [blame] | 490 | extern MagickExport const char |
cristy | 8ea8122 | 2011-09-04 10:33:32 +0000 | [diff] [blame] | 491 | DefaultTileGeometry[], |
| 492 | DefaultTileLabel[], |
| 493 | LoadImageTag[], |
| 494 | LoadImagesTag[], |
| 495 | PSDensityGeometry[], |
| 496 | PSPageGeometry[], |
| 497 | SaveImageTag[], |
| 498 | SaveImagesTag[]; |
| 499 | |
| 500 | extern MagickExport const double |
| 501 | DefaultResolution; |
| 502 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 503 | extern MagickExport ExceptionType |
| 504 | CatchImageException(Image *); |
| 505 | |
cristy | 15781e5 | 2009-12-05 23:05:27 +0000 | [diff] [blame] | 506 | extern MagickExport FILE |
| 507 | *GetImageInfoFile(const ImageInfo *); |
| 508 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 509 | extern MagickExport Image |
cristy | 9950d57 | 2011-10-01 18:22:35 +0000 | [diff] [blame] | 510 | *AcquireImage(const ImageInfo *,ExceptionInfo *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 511 | *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *), |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 512 | *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType, |
| 513 | ExceptionInfo *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 514 | *DestroyImage(Image *), |
| 515 | *GetImageClipMask(const Image *,ExceptionInfo *), |
| 516 | *GetImageMask(const Image *,ExceptionInfo *), |
cristy | 0740a98 | 2011-10-13 15:01:01 +0000 | [diff] [blame] | 517 | *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *, |
| 518 | ExceptionInfo *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 519 | *ReferenceImage(Image *), |
cristy | 4285d78 | 2011-02-09 20:12:28 +0000 | [diff] [blame] | 520 | *SmushImages(const Image *,const MagickBooleanType,const ssize_t, |
| 521 | ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 522 | |
| 523 | extern MagickExport ImageInfo |
| 524 | *AcquireImageInfo(void), |
| 525 | *CloneImageInfo(const ImageInfo *), |
| 526 | *DestroyImageInfo(ImageInfo *); |
| 527 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 528 | extern MagickExport MagickBooleanType |
cristy | 018f07f | 2011-09-04 21:15:19 +0000 | [diff] [blame] | 529 | ClipImage(Image *,ExceptionInfo *), |
| 530 | ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 531 | GetImageAlphaChannel(const Image *), |
| 532 | IsTaintImage(const Image *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 533 | IsHighDynamicRangeImage(const Image *,ExceptionInfo *), |
| 534 | IsImageObject(const Image *), |
| 535 | ListMagickInfo(FILE *,ExceptionInfo *), |
| 536 | ModifyImage(Image **,ExceptionInfo *), |
| 537 | ResetImagePage(Image *,const char *), |
cristy | e941a75 | 2011-10-15 01:52:48 +0000 | [diff] [blame] | 538 | SetImageAlpha(Image *,const Quantum,ExceptionInfo *), |
cristy | b15b06c | 2012-08-28 11:36:48 +0000 | [diff] [blame] | 539 | SetImageAlphaChannel(Image *,const AlphaChannelOption,ExceptionInfo *), |
cristy | ea1a8aa | 2011-10-20 13:24:06 +0000 | [diff] [blame] | 540 | SetImageBackgroundColor(Image *,ExceptionInfo *), |
cristy | e941a75 | 2011-10-15 01:52:48 +0000 | [diff] [blame] | 541 | SetImageColor(Image *,const PixelInfo *,ExceptionInfo *), |
cristy | 6324088 | 2011-08-05 19:05:27 +0000 | [diff] [blame] | 542 | SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *), |
cristy | d965a42 | 2010-03-03 17:47:35 +0000 | [diff] [blame] | 543 | SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *), |
cristy | 018f07f | 2011-09-04 21:15:19 +0000 | [diff] [blame] | 544 | SetImageMask(Image *,const Image *,ExceptionInfo *), |
cristy | 574cc26 | 2011-08-05 01:23:58 +0000 | [diff] [blame] | 545 | SetImageStorageClass(Image *,const ClassType,ExceptionInfo *), |
cristy | e941a75 | 2011-10-15 01:52:48 +0000 | [diff] [blame] | 546 | StripImage(Image *,ExceptionInfo *), |
cristy | ea1a8aa | 2011-10-20 13:24:06 +0000 | [diff] [blame] | 547 | SyncImage(Image *,ExceptionInfo *), |
cristy | 6fccee1 | 2011-10-20 18:43:18 +0000 | [diff] [blame] | 548 | SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *), |
| 549 | SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 550 | |
| 551 | extern MagickExport size_t |
cristy | 6fccee1 | 2011-10-20 18:43:18 +0000 | [diff] [blame] | 552 | InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *, |
| 553 | ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 554 | |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 555 | extern MagickExport ssize_t |
| 556 | GetImageReferenceCount(Image *); |
| 557 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 558 | extern MagickExport VirtualPixelMethod |
| 559 | GetImageVirtualPixelMethod(const Image *), |
cristy | 387430f | 2012-02-07 13:09:46 +0000 | [diff] [blame] | 560 | SetImageVirtualPixelMethod(Image *,const VirtualPixelMethod,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 561 | |
| 562 | extern MagickExport void |
cristy | 9950d57 | 2011-10-01 18:22:35 +0000 | [diff] [blame] | 563 | AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 564 | DestroyImagePixels(Image *), |
| 565 | DisassociateImageStream(Image *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 566 | GetImageInfo(ImageInfo *), |
| 567 | SetImageInfoBlob(ImageInfo *,const void *,const size_t), |
| 568 | SetImageInfoFile(ImageInfo *,FILE *); |
| 569 | |
| 570 | #if defined(__cplusplus) || defined(c_plusplus) |
| 571 | } |
| 572 | #endif |
| 573 | |
| 574 | #endif |