aboutsummaryrefslogtreecommitdiff
path: root/image/jpeg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'image/jpeg.cpp')
-rw-r--r--image/jpeg.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/image/jpeg.cpp b/image/jpeg.cpp
index 9d4b0a7cfe..3602d501be 100644
--- a/image/jpeg.cpp
+++ b/image/jpeg.cpp
@@ -44,7 +44,7 @@ extern "C" {
namespace Image {
-JPEGDecoder::JPEGDecoder() : ImageDecoder(), _surface(), _colorSpace(kColorSpaceRGBA) {
+JPEGDecoder::JPEGDecoder() : _surface(), _colorSpace(kColorSpaceRGBA) {
}
JPEGDecoder::~JPEGDecoder() {
@@ -59,6 +59,17 @@ void JPEGDecoder::destroy() {
_surface.free();
}
+const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream *stream) {
+ if (!loadStream(*stream))
+ return 0;
+
+ return getSurface();
+}
+
+Graphics::PixelFormat JPEGDecoder::getPixelFormat() const {
+ return _surface.format;
+}
+
#ifdef USE_JPEG
namespace {