/usr/include/GraphicsMagick/magick/pixel_iterator.h is in libgraphicsmagick1-dev 1.3.28-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | /*
Copyright (C) 2004-2016 GraphicsMagick Group
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
Interfaces to support simple iterative pixel read/update access within an
image or between two images. These interfaces exist in order to eliminate
large amounts of redundant code and to allow changing the underlying
implementation without changing the using code. These interfaces
intentionally omit any pixel position information in order to not constrain
the implementation and to improve performance.
User-provided callbacks must be thread-safe (preferably re-entrant) since
they may be invoked by multiple threads.
These interfaces have proven to be future safe (since implemented) and may
be safely used by other applications/libraries.
Written by Bob Friesenhahn, March 2004, Updated for regions 2008.
*/
#ifndef _PIXEL_ROW_ITERATOR_H
#define _PIXEL_ROW_ITERATOR_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
/*
Pixel iterator options.
*/
typedef struct _PixelIteratorOptions
{
int max_threads; /* Desired number of threads */
unsigned long signature;
} PixelIteratorOptions;
/*
Initialize pixel iterator options with defaults.
*/
extern MagickExport void
InitializePixelIteratorOptions(PixelIteratorOptions *options,
ExceptionInfo *exception);
/*
Read-only access across pixel region.
*/
typedef MagickPassFail (*PixelIteratorMonoReadCallback)
(
void *mutable_data, /* User provided mutable data */
const void *immutable_data, /* User provided immutable data */
const Image *const_image, /* Input image */
const PixelPacket *pixels, /* Pixel row */
const IndexPacket *indexes, /* Pixel indexes */
const long npixels, /* Number of pixels in row */
ExceptionInfo *exception /* Exception report */
);
extern MagickExport MagickPassFail
PixelIterateMonoRead(PixelIteratorMonoReadCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const long x,
const long y,
const unsigned long columns,
const unsigned long rows,
const Image *image,
ExceptionInfo *exception);
typedef MagickPassFail (*PixelIteratorMonoModifyCallback)
(
void *mutable_data, /* User provided mutable data */
const void *immutable_data, /* User provided immutable data */
Image *image, /* Modify image */
PixelPacket *pixels, /* Pixel row */
IndexPacket *indexes, /* Pixel row indexes */
const long npixels, /* Number of pixels in row */
ExceptionInfo *exception /* Exception report */
);
/*
Write access across pixel region.
*/
extern MagickExport MagickPassFail
PixelIterateMonoSet(PixelIteratorMonoModifyCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const long x,
const long y,
const unsigned long columns,
const unsigned long rows,
Image *image,
ExceptionInfo *exception);
/*
Read-write access across pixel region.
*/
extern MagickExport MagickPassFail
PixelIterateMonoModify(PixelIteratorMonoModifyCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const long x,
const long y,
const unsigned long columns,
const unsigned long rows,
Image *image,
ExceptionInfo *exception);
/*
Read-only access across pixel regions of two images.
*/
typedef MagickPassFail (*PixelIteratorDualReadCallback)
(
void *mutable_data, /* User provided mutable data */
const void *immutable_data, /* User provided immutable data */
const Image *first_image, /* First Input image */
const PixelPacket *first_pixels, /* Pixel row in first image */
const IndexPacket *first_indexes, /* Pixel row indexes in first image */
const Image *second_image, /* Second Input image */
const PixelPacket *second_pixels, /* Pixel row in second image */
const IndexPacket *second_indexes, /* Pixel row indexes in second image */
const long npixels, /* Number of pixels in row */
ExceptionInfo *exception /* Exception report */
);
extern MagickExport MagickPassFail
PixelIterateDualRead(PixelIteratorDualReadCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const unsigned long columns,
const unsigned long rows,
const Image *first_image,
const long first_x,
const long first_y,
const Image *second_image,
const long second_x,
const long second_y,
ExceptionInfo *exception);
/*
Read-write access across pixel regions of two images. The first
(source) image is accessed read-only while the second (update)
image is accessed as read-write.
*/
typedef MagickPassFail (*PixelIteratorDualModifyCallback)
(
void *mutable_data, /* User provided mutable data */
const void *immutable_data, /* User provided immutable data */
const Image *source_image, /* Source image */
const PixelPacket *source_pixels, /* Pixel row in source image */
const IndexPacket *source_indexes, /* Pixel row indexes in source image */
Image *update_image, /* Update image */
PixelPacket *update_pixels, /* Pixel row in update image */
IndexPacket *update_indexes, /* Pixel row indexes in update image */
const long npixels, /* Number of pixels in row */
ExceptionInfo *exception /* Exception report */
);
extern MagickExport MagickPassFail
PixelIterateDualModify(PixelIteratorDualModifyCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const unsigned long columns,
const unsigned long rows,
const Image *source_image,
const long source_x,
const long source_y,
Image *update_image,
const long update_x,
const long update_y,
ExceptionInfo *exception);
/*
Read-write access across pixel regions of two images. The first
(source) image is accessed read-only while the second (new)
image is accessed for write (uninitialized pixels).
*/
typedef PixelIteratorDualModifyCallback PixelIteratorDualNewCallback;
extern MagickExport MagickPassFail
PixelIterateDualNew(PixelIteratorDualNewCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const unsigned long columns,
const unsigned long rows,
const Image *source_image,
const long source_x,
const long source_y,
Image *new_image,
const long new_x,
const long new_y,
ExceptionInfo *exception);
/*
Read-read-write access across pixel regions of three images. The
first two images are accessed read-only while the third is
accessed as read-write.
*/
typedef MagickPassFail (*PixelIteratorTripleModifyCallback)
(
void *mutable_data, /* User provided mutable data */
const void *immutable_data, /* User provided immutable data */
const Image *source1_image, /* Source 1 image */
const PixelPacket *source1_pixels, /* Pixel row in source 1 image */
const IndexPacket *source1_indexes, /* Pixel row indexes in source 1 image */
const Image *source2_image, /* Source 2 image */
const PixelPacket *source2_pixels, /* Pixel row in source 2 image */
const IndexPacket *source2_indexes, /* Pixel row indexes in source 2 image */
Image *update_image, /* Update image */
PixelPacket *update_pixels, /* Pixel row in update image */
IndexPacket *update_indexes, /* Pixel row indexes in update image */
const long npixels, /* Number of pixels in row */
ExceptionInfo *exception /* Exception report */
);
extern MagickExport MagickPassFail
PixelIterateTripleModify(PixelIteratorTripleModifyCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const unsigned long columns,
const unsigned long rows,
const Image *source1_image,
const Image *source2_image,
const long source_x,
const long source_y,
Image *update_image,
const long update_x,
const long update_y,
ExceptionInfo *exception);
/*
Read-write access across pixel regions of two images. The first
(source) image is accessed read-only while the second (new)
image is accessed for write (uninitialized pixels).
*/
typedef PixelIteratorTripleModifyCallback PixelIteratorTripleNewCallback;
extern MagickExport MagickPassFail
PixelIterateTripleNew(PixelIteratorTripleNewCallback call_back,
const PixelIteratorOptions *options,
const char *description,
void *mutable_data,
const void *immutable_data,
const unsigned long columns,
const unsigned long rows,
const Image *source1_image,
const Image *source2_image,
const long source_x,
const long source_y,
Image *new_image,
const long new_x,
const long new_y,
ExceptionInfo *exception);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif /* _PIXEL_ROW_ITERATOR_H */
/*
* Local Variables:
* mode: c
* c-basic-offset: 2
* fill-column: 78
* End:
*/
|