aboutsummaryrefslogtreecommitdiff
path: root/graphics/jpeg.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-05-01 16:54:45 +0200
committerJohannes Schickel2011-05-01 16:54:45 +0200
commit71bdb86e028db9556611f88b3686ce93312a8131 (patch)
tree3c24233044a8e72bd8ecd73b981f50c725d5d282 /graphics/jpeg.cpp
parent89b63e3adb4692c9659f8b133727ccc1e2af75b4 (diff)
parent8ff527ac4ef4237e63c0802a22eb0f942089e6c4 (diff)
downloadscummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.gz
scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.bz2
scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.zip
Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here: https://github.com/scummvm/scummvm/pull/16 Conflicts: graphics/png.cpp
Diffstat (limited to 'graphics/jpeg.cpp')
-rw-r--r--graphics/jpeg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp
index 2d990b9b0e..f1dcd4ac0c 100644
--- a/graphics/jpeg.cpp
+++ b/graphics/jpeg.cpp
@@ -96,7 +96,7 @@ Surface *JPEG::getSurface(const PixelFormat &format) {
Graphics::Surface *vComponent = getComponent(3);
Graphics::Surface *output = new Graphics::Surface();
- output->create(yComponent->w, yComponent->h, format.bytesPerPixel);
+ output->create(yComponent->w, yComponent->h, format);
for (uint16 i = 0; i < output->h; i++) {
for (uint16 j = 0; j < output->w; j++) {
@@ -444,7 +444,7 @@ bool JPEG::readSOS() {
// Initialize the scan surfaces
for (uint16 c = 0; c < _numScanComp; c++) {
- _scanComp[c]->surface.create(xMCU * _maxFactorH * 8, yMCU * _maxFactorV * 8, 1);
+ _scanComp[c]->surface.create(xMCU * _maxFactorH * 8, yMCU * _maxFactorV * 8, PixelFormat::createFormatCLUT8());
}
bool ok = true;