24 #ifndef GNASH_GNASHIMAGE_H
25 #define GNASH_GNASHIMAGE_H
27 #include <boost/shared_ptr.hpp>
28 #include <boost/noncopyable.hpp>
29 #include <boost/cstdint.hpp>
30 #include <boost/scoped_array.hpp>
115 return _width * channels();
146 void update(const_iterator
data);
167 return begin() + size();
172 return begin() + size();
256 void setPixel(
size_t x,
size_t y, value_type
r, value_type
g, value_type
b,
270 Input(boost::shared_ptr<IOChannel> in)
279 virtual void read() = 0;
289 virtual size_t getWidth()
const = 0;
312 boost::shared_ptr<gnash::IOChannel> in);
356 virtual void writeImageRGB(
const unsigned char* rgbData) = 0;
363 log_error(
_(
"This image format does not support writing RGBA images"));
376 boost::shared_ptr<gnash::IOChannel> out,
const GnashImage& image,
396 assert(row < im.
height());
407 assert(row < im.
height());
412 const size_t bufferLength);
Definition: GnashKey.h:147
const_iterator end() const
An iterator to the end of the data.
Definition: GnashImage.h:171
Output(boost::shared_ptr< IOChannel > out, size_t width, size_t height)
Construct an Output for writing to an IOChannel.
Definition: GnashImage.h:344
size_t width() const
Get the image's width.
Definition: GnashImage.h:128
virtual size_t stride() const
Get the pitch of the image buffer.
Definition: GnashImage.h:114
32-bit RGBA bitmap
Definition: GnashImage.h:237
int _height
Definition: Renderer_cairo.cpp:213
FileType
Definition: GnashEnums.h:25
const size_t _height
Definition: GnashImage.h:383
ImageLocation location() const
Return the ImageLocation of the image.
Definition: GnashImage.h:100
static DSOEXPORT void writeImageData(FileType type, boost::shared_ptr< gnash::IOChannel > out, const GnashImage &image, int quality)
Write the given image to the given IOChannel in a specified format.
Definition: GnashImage.cpp:177
int _width
Definition: Renderer_cairo.cpp:212
ImageRGBA(iterator data, size_t width, size_t height)
Definition: GnashImage.h:245
Definition: GnashImage.h:51
const ImageLocation _location
Image data location (CPU or GPU)
Definition: GnashImage.h:202
ImageRGB(iterator data, size_t width, size_t height)
Create an ImageRGB taking ownership of the data.
Definition: GnashImage.h:226
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
virtual ~GnashImage()
Definition: GnashImage.h:88
virtual iterator begin()
Access the raw data.
Definition: GnashImage.h:156
container_type _data
Data if held in this class.
Definition: GnashImage.h:211
SimpleBuffer data
Definition: LocalConnection_as.cpp:153
type
Definition: GnashKey.h:329
const size_t _width
Definition: GnashImage.h:381
Definition: klash_part.cpp:329
24-bit RGB bitmap
Definition: GnashImage.h:218
const size_t _width
Width of image, in pixels.
Definition: GnashImage.h:205
size_t size() const
Get the size of the image buffer.
Definition: GnashImage.h:107
Definition: GnashImage.h:52
Definition: GnashKey.h:164
Definition: GnashKey.h:166
ImageType type() const
Return the ImageType of the image.
Definition: GnashImage.h:93
Definition: klash_part.cpp:329
boost::uint8_t value_type
Definition: GnashImage.h:83
#define _(String)
Definition: log.h:44
size_t channels() const
Get the number of channels.
Definition: GnashImage.h:121
ImageType
The types of images handled in Gnash.
Definition: GnashImage.h:48
virtual void writeImageRGBA(const unsigned char *)
Write RGBA image data using the parameters supplied at construction.
Definition: GnashImage.h:361
SimpleBuffer _data
The data to be sent by POST with this request.
Definition: NetConnection_as.cpp:211
GnashImage::iterator scanline(GnashImage &im, size_t row)
Get a pointer to a given row of any image.
Definition: GnashImage.h:394
boost::shared_ptr< IOChannel > _outStream
Definition: GnashImage.h:385
boost::int32_t x
Definition: BitmapData_as.cpp:434
size_t height() const
Get the image's width.
Definition: GnashImage.h:135
boost::scoped_array< value_type > container_type
Definition: GnashImage.h:84
size_t numChannels(ImageType t)
Definition: GnashImage.h:63
Definition: GnashKey.h:148
#define DSOEXPORT
Definition: dsodefs.h:55
ImageLocation
The locations of images handled in Gnash.
Definition: GnashImage.h:56
Definition: GnashImage.h:333
const size_t _height
Height of image, in pixels.
Definition: GnashImage.h:208
Definition: GnashImage.h:58
value_type * iterator
Definition: GnashImage.h:85
boost::int32_t y
Definition: BitmapData_as.cpp:435
Base class for different types of bitmaps.
Definition: GnashImage.h:79
Definition: GnashKey.h:153
Definition: GnashImage.h:59
const ImageType _type
The type of the image: RGBA or RGB.
Definition: GnashImage.h:199
void mergeAlpha(ImageRGBA &im, GnashImage::const_iterator alphaData, const size_t bufferLength)
Definition: GnashImage.cpp:148
iterator end()
An iterator to the end of the data.
Definition: GnashImage.h:166
virtual const_iterator begin() const
Access the raw data.
Definition: GnashImage.h:161
virtual void writeImageRGB(const unsigned char *rgbData)=0
Write RGB image data using the parameters supplied at construction.
const value_type * const_iterator
Definition: GnashImage.h:86
virtual ~Output()
Definition: GnashImage.h:351
Definition: GnashImage.h:50