9 #define MAGICKCORE_IMPLEMENTATION 1
10 #define MAGICK_PLUSPLUS_IMPLEMENTATION 1
26 _view=AcquireVirtualCacheView(image_.
image(),exceptionInfo);
32 if (_view != (MagickCore::CacheView *) NULL)
33 _view=DestroyCacheView(_view);
37 const size_t columns_,
const size_t rows_)
45 PixelPacket* pixels=GetCacheViewAuthenticPixels(_view,x_,y_,columns_,rows_,
53 const ssize_t y_,
const size_t columns_,
const size_t rows_)
61 const PixelPacket* pixels=GetCacheViewVirtualPixels(_view,x_,y_,columns_,
69 const size_t columns_,
const size_t rows_)
77 PixelPacket* pixels=QueueCacheViewAuthenticPixels(_view,x_,y_,columns_,rows_,
87 (void) SyncCacheViewAuthenticPixels(_view,exceptionInfo);
93 IndexPacket* pixel_indexes=GetCacheViewAuthenticIndexQueue(_view);
96 _image.throwImageException();
102 const StorageType type_)
104 init(image_,0,0,image_.
columns(),image_.
rows(),map_,type_);
108 const ::ssize_t y_,
const size_t width_,
const size_t height_,std::string map_,
109 const StorageType type_)
111 init(image_,x_,y_,width_,height_,map_,type_);
134 void Magick::PixelData::init(
Magick::Image &image_,const ::ssize_t x_,
135 const ::ssize_t y_,
const size_t width_,
const size_t height_,
136 std::string map_,
const StorageType type_)
144 if ((x_ < 0) || (width_ == 0) || (y_ < 0) || (height_ == 0) ||
145 (x_ > (ssize_t) image_.
columns()) || ((width_ + x_) > image_.
columns())
146 || (y_ > (ssize_t) image_.
rows()) || ((height_ + y_) > image_.
rows())
147 || (map_.length() == 0))
153 size=
sizeof(
unsigned char);
163 size=
sizeof(
unsigned int);
166 size=
sizeof(Quantum);
169 size=
sizeof(
unsigned short);
176 _length=width_*height_*map_.length();
178 _data=AcquireMagickMemory(_size);
181 MagickCore::ExportImagePixels(image_.
constImage(),x_,y_,width_,height_,
182 map_.c_str(),type_,_data,exceptionInfo);
183 if (exceptionInfo->severity != UndefinedException)
188 void Magick::PixelData::relinquish(
void) throw()
190 if (_data != (
void *)NULL)
191 _data=RelinquishMagickMemory(_data);
void quiet(const bool quiet_)
const PixelPacket * getConst(const ::ssize_t x_, const ::ssize_t y_, const size_t columns_, const size_t rows_)
MagickCore::Image *& image(void)
size_t columns(void) const
Pixels(Magick::Image &image_)
const MagickCore::Image * constImage(void) const
MagickPPExport void throwExceptionExplicit(const MagickCore::ExceptionType severity_, const char *reason_, const char *description_=(char *) NULL)
IndexPacket * indexes(void)
#define ThrowPPException(quiet)
::ssize_t size(void) const
PixelData(Magick::Image &image_, std::string map_, const StorageType type_)
::ssize_t length(void) const
const void * data(void) const
PixelPacket * get(const ::ssize_t x_, const ::ssize_t y_, const size_t columns_, const size_t rows_)
PixelPacket * set(const ::ssize_t x_, const ::ssize_t y_, const size_t columns_, const size_t rows_)