Go to the documentation of this file.
24 #ifndef GNASH_IMAGE_JPEG_H
25 #define GNASH_IMAGE_JPEG_H
41 namespace gnash {
class IOChannel; }
54 const char* _errorOccurred;
59 jpeg_decompress_struct m_cinfo;
60 jpeg_error_mgr m_jerr;
62 bool _compressorOpened;
78 void DSOEXPORT readHeader(
unsigned int maxHeaderBytes);
104 size_t getWidth()
const;
109 size_t getComponents()
const;
116 void readScanline(
unsigned char* rgbData);
121 static std::unique_ptr<Input>
create(std::shared_ptr<IOChannel> in)
123 std::unique_ptr<Input> ret(
new JpegInput(in));
125 if (ret.get()) ret->read();
136 DSOEXPORT static std::unique_ptr<GnashImage> readSWFJpeg2WithTables(
146 std::shared_ptr<IOChannel> in,
unsigned int maxHeaderBytes)
148 std::unique_ptr<JpegInput> ret (
new JpegInput(in));
150 if (ret.get()) ret->readHeader(maxHeaderBytes);
160 void errorOccurred(
const char* msg);
178 size_t height,
int quality);
200 static std::unique_ptr<Output>
create(std::shared_ptr<IOChannel> out,
205 jpeg_compress_struct m_cinfo;
206 jpeg_error_mgr m_jerr;
JpegOutput(std::shared_ptr< IOChannel > out, size_t width, size_t height, int quality)
Constract a JpegOutput for writing to an IOChannel.
Definition: GnashImageJpeg.cpp:564
virtual void writeImageRGB(const unsigned char *rgbData)
Write RGB image data using the parameters supplied at construction.
Definition: GnashImageJpeg.cpp:594
Definition: GnashImageJpeg.h:167
@ height
Definition: klash_part.cpp:329
24-bit RGB bitmap
Definition: GnashImage.h:217
std::shared_ptr< IOChannel > _outStream
Definition: GnashImage.h:383
jpeg_source_mgr m_pub
Definition: GnashImageJpeg.cpp:81
std::int32_t y
Definition: BitmapData_as.cpp:435
Definition: GnashImage.h:332
#define _(String)
Definition: log.h:44
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
as_value getHeight(DisplayObject &o)
Definition: DisplayObject.cpp:356
void log_error(StringType msg, Args... args)
Definition: log.h:283
virtual void writeImageRGBA(const unsigned char *rgbaData)
Write RGBA image data using the parameters supplied at construction.
Definition: GnashImageJpeg.cpp:607
A virtual IO channel.
Definition: IOChannel.h:43
An SWF parsing exception.
Definition: GnashException.h:90
GnashImage::iterator scanline(GnashImage &im, size_t row)
Get a pointer to a given row of any image.
Definition: GnashImage.h:392
static std::unique_ptr< Output > create(std::shared_ptr< IOChannel > out, size_t width, size_t height, int quality)
Create a JpegOutput, transferring ownership to the caller.
Definition: GnashImageJpeg.cpp:624
const size_t _width
Definition: GnashImage.h:379
@ TYPE_RGB
Definition: GnashImage.h:49
const size_t _height
Definition: GnashImage.h:381
#define DSOEXPORT
Definition: dsodefs.h:55
bool equal(string_table &st, string_table::key a, string_table::key b, bool caseless)
Check whether two keys are equivalent.
Definition: string_table.cpp:174
@ source
Definition: klash_part.cpp:329
~JpegOutput()
Definition: GnashImageJpeg.cpp:586
@ o
Definition: GnashKey.h:161
@ width
Definition: klash_part.cpp:329
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
@ TYPE_RGBA
Definition: GnashImage.h:50