11 #define MAGICKCORE_IMPLEMENTATION 1 12 #define MAGICK_PLUSPLUS_IMPLEMENTATION 1 29 _view=AcquireVirtualCacheView(image_.
image(),exceptionInfo),
36 _view=DestroyCacheView(_view);
40 const size_t columns_,
const size_t rows_)
48 Quantum* pixels=GetCacheViewAuthenticPixels(_view,x_,y_,columns_,rows_,
56 const ssize_t y_,
const size_t columns_,
const size_t rows_)
64 const Quantum* pixels=GetCacheViewVirtualPixels(_view,x_,y_,columns_,rows_,
73 if (_image.constImage()->channel_map[channel].traits == UndefinedPixelTrait)
75 return _image.constImage()->channel_map[channel].offset;
79 const size_t columns_,
const size_t rows_)
87 Quantum* pixels=QueueCacheViewAuthenticPixels(_view,x_,y_,columns_,rows_,
97 (void) SyncCacheViewAuthenticPixels(_view,exceptionInfo);
104 void* pixel_metacontent=GetCacheViewAuthenticMetacontent(_view);
106 return pixel_metacontent;
110 const StorageType type_)
112 init(image_,0,0,image_.
columns(),image_.
rows(),map_,type_);
116 const ::ssize_t y_,
const size_t width_,
const size_t height_,std::string map_,
117 const StorageType type_)
119 init(image_,x_,y_,width_,height_,map_,type_);
142 void Magick::PixelData::init(
Magick::Image &image_,const ::ssize_t x_,
143 const ::ssize_t y_,
const size_t width_,
const size_t height_,
144 std::string map_,
const StorageType type_)
152 if ((x_ < 0) || (width_ == 0) || (y_ < 0) || (height_ == 0) ||
153 (x_ > (ssize_t) image_.
columns()) || ((width_ + x_) > image_.
columns())
154 || (y_ > (ssize_t) image_.
rows()) || ((height_ + y_) > image_.
rows())
155 || (map_.length() == 0))
161 size=
sizeof(
unsigned char);
170 size=
sizeof(
unsigned int);
173 size=
sizeof(MagickSizeType);
176 size=
sizeof(Quantum);
179 size=
sizeof(
unsigned short);
186 _length=width_*height_*map_.length();
188 _data=AcquireMagickMemory(_size);
191 MagickCore::ExportImagePixels(image_.
image(),x_,y_,width_,height_,
192 map_.c_str(),type_,_data,exceptionInfo);
193 if (exceptionInfo->severity != MagickCore::UndefinedException)
198 void Magick::PixelData::relinquish(
void)
throw()
200 if (_data != (
void *)NULL)
201 _data=RelinquishMagickMemory(_data);
Quantum * get(const ::ssize_t x_, const ::ssize_t y_, const size_t columns_, const size_t rows_)
const Quantum * getConst(const ::ssize_t x_, const ::ssize_t y_, const size_t columns_, const size_t rows_)
void quiet(const bool quiet_)
MagickCore::Image *& image(void)
::ssize_t length(void) const
const void * data(void) const
Pixels(Magick::Image &image_)
::ssize_t size(void) const
MagickPPExport void throwExceptionExplicit(const MagickCore::ExceptionType severity_, const char *reason_, const char *description_=(char *) NULL)
#define ThrowPPException(quiet)
PixelData(Magick::Image &image_, std::string map_, const StorageType type_)
Quantum * set(const ::ssize_t x_, const ::ssize_t y_, const size_t columns_, const size_t rows_)
ssize_t offset(PixelChannel channel) const
size_t columns(void) const