24 #ifndef GNASH_GNASHIMAGE_H 25 #define GNASH_GNASHIMAGE_H 27 #include <boost/noncopyable.hpp> 106 return stride() * _height;
113 return _width * channels();
144 void update(const_iterator
data);
159 virtual const_iterator
begin()
const {
165 return begin() + size();
169 const_iterator
end()
const {
170 return begin() + size();
268 Input(std::shared_ptr<IOChannel> in)
277 virtual void read() = 0;
287 virtual size_t getWidth()
const = 0;
292 virtual size_t getComponents()
const = 0;
297 virtual void readScanline(
unsigned char* rgbData) = 0;
309 DSOEXPORT static std::unique_ptr<ImageRGBA> readSWFJpeg3(
310 std::shared_ptr<gnash::IOChannel> in);
319 DSOEXPORT static std::unique_ptr<GnashImage> readImageData(
354 virtual void writeImageRGB(
const unsigned char* rgbData) = 0;
361 log_error(
_(
"This image format does not support writing RGBA images"));
374 std::shared_ptr<gnash::IOChannel> out,
const GnashImage& image,
394 assert(row < im.
height());
405 assert(row < im.
height());
410 const size_t bufferLength);
Definition: GnashKey.h:147
ImageLocation location() const
Return the ImageLocation of the image.
Definition: GnashImage.h:98
32-bit RGBA bitmap
Definition: GnashImage.h:235
FileType
Definition: GnashEnums.h:25
const size_t _height
Definition: GnashImage.h:381
Output(std::shared_ptr< IOChannel > out, size_t width, size_t height)
Construct an Output for writing to an IOChannel.
Definition: GnashImage.h:342
ImageRGBA(iterator data, size_t width, size_t height)
Definition: GnashImage.h:243
Definition: GnashImage.h:49
const ImageLocation _location
Image data location (CPU or GPU)
Definition: GnashImage.h:200
size_t size() const
Get the size of the image buffer.
Definition: GnashImage.h:105
ImageRGB(iterator data, size_t width, size_t height)
Create an ImageRGB taking ownership of the data.
Definition: GnashImage.h:224
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
virtual ~GnashImage()
Definition: GnashImage.h:86
virtual iterator begin()
Access the raw data.
Definition: GnashImage.h:154
container_type _data
Data if held in this class.
Definition: GnashImage.h:209
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
type
Definition: GnashKey.h:329
const size_t _width
Definition: GnashImage.h:379
Definition: klash_part.cpp:329
24-bit RGB bitmap
Definition: GnashImage.h:216
const size_t _width
Width of image, in pixels.
Definition: GnashImage.h:203
size_t height() const
Get the image's width.
Definition: GnashImage.h:133
Definition: GnashImage.h:50
Definition: GnashKey.h:164
Definition: GnashKey.h:166
std::uint8_t value_type
Definition: GnashImage.h:81
Definition: klash_part.cpp:329
#define _(String)
Definition: log.h:44
std::unique_ptr< value_type[]> container_type
Definition: GnashImage.h:82
std::shared_ptr< IOChannel > _outStream
Definition: GnashImage.h:383
size_t width() const
Get the image's width.
Definition: GnashImage.h:126
void log_error(StringType msg, Args... args)
Definition: log.h:283
ImageType
The types of images handled in Gnash.
Definition: GnashImage.h:46
virtual void writeImageRGBA(const unsigned char *)
Write RGBA image data using the parameters supplied at construction.
Definition: GnashImage.h:359
GnashImage::iterator scanline(GnashImage &im, size_t row)
Get a pointer to a given row of any image.
Definition: GnashImage.h:392
const_iterator end() const
An iterator to the end of the data.
Definition: GnashImage.h:169
virtual size_t stride() const
Get the pitch of the image buffer.
Definition: GnashImage.h:112
std::int32_t x
Definition: BitmapData_as.cpp:434
size_t numChannels(ImageType t)
Definition: GnashImage.h:61
Definition: GnashKey.h:148
#define DSOEXPORT
Definition: dsodefs.h:55
ImageLocation
The locations of images handled in Gnash.
Definition: GnashImage.h:54
Definition: GnashImage.h:331
const size_t _height
Height of image, in pixels.
Definition: GnashImage.h:206
Definition: GnashImage.h:56
value_type * iterator
Definition: GnashImage.h:83
std::int32_t y
Definition: BitmapData_as.cpp:435
Base class for different types of bitmaps.
Definition: GnashImage.h:77
Definition: GnashKey.h:153
size_t channels() const
Get the number of channels.
Definition: GnashImage.h:119
Definition: GnashImage.h:57
const ImageType _type
The type of the image: RGBA or RGB.
Definition: GnashImage.h:197
void mergeAlpha(ImageRGBA &im, GnashImage::const_iterator alphaData, const size_t bufferLength)
Definition: GnashImage.cpp:146
iterator end()
An iterator to the end of the data.
Definition: GnashImage.h:164
ImageType type() const
Return the ImageType of the image.
Definition: GnashImage.h:91
const value_type * const_iterator
Definition: GnashImage.h:84
virtual ~Output()
Definition: GnashImage.h:349
Definition: GnashImage.h:48
as_value getHeight(DisplayObject &o)
Definition: DisplayObject.cpp:356
virtual const_iterator begin() const
Access the raw data.
Definition: GnashImage.h:159