Commit ef642065 authored by Albert Astals Cid's avatar Albert Astals Cid

Fix jpeg image export

Use same logic than the one used in ImageOutputDev
Bug #48270
parent 681f52a5
......@@ -36,6 +36,7 @@
// Copyright (C) 2012 Pino Toscano <pino@kde.org>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr>
// Copyright (C) 2013 Johannes Brandstätter <jbrandstaetter@gmail.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -1502,7 +1503,8 @@ void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
/*if( !globalParams->getErrQuiet() )
printf("image stream of kind %d\n", str->getKind());*/
// dump JPEG file
if (dumpJPEG && str->getKind() == strDCT) {
if (dumpJPEG && str->getKind() == strDCT && (colorMap->getNumPixelComps() == 1 ||
colorMap->getNumPixelComps() == 3) && !inlineImg) {
drawJpegImage(state, str);
}
else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment