summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2006-05-22 19:58:41 +0000
committerKristian Høgsberg <krh@redhat.com>2006-05-22 19:58:41 +0000
commit680f20dfd1cf0342d49516b3848a2aef5d2a3883 (patch)
tree76fb5db69c59a1733492dc938846b2806e9cc28a /utils
parente43a06bf6e953fa9af18476e2c9f27106398c09c (diff)
2006-05-22 Kristian Høgsberg <krh@redhat.com>
Patch from Rainer Keller to fix the ImageOutputDev (#6984). * utils/ImageOutputDev.cc (drawImage): Upate to work with new 16-bit color representation. * utils/ImageOutputDev.h: Return gTrue for needNonText().
Diffstat (limited to 'utils')
-rw-r--r--utils/ImageOutputDev.cc6
-rw-r--r--utils/ImageOutputDev.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/utils/ImageOutputDev.cc b/utils/ImageOutputDev.cc
index 04e46467..6c2b428e 100644
--- a/utils/ImageOutputDev.cc
+++ b/utils/ImageOutputDev.cc
@@ -184,9 +184,9 @@ void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
p = imgStr->getLine();
for (x = 0; x < width; ++x) {
colorMap->getRGB(p, &rgb);
- fputc((int)(rgb.r * 255 + 0.5), f);
- fputc((int)(rgb.g * 255 + 0.5), f);
- fputc((int)(rgb.b * 255 + 0.5), f);
+ fputc(colToByte(rgb.r), f);
+ fputc(colToByte(rgb.g), f);
+ fputc(colToByte(rgb.b), f);
p += colorMap->getNumPixelComps();
}
}
diff --git a/utils/ImageOutputDev.h b/utils/ImageOutputDev.h
index 404e2f8c..90c2e6f8 100644
--- a/utils/ImageOutputDev.h
+++ b/utils/ImageOutputDev.h
@@ -45,7 +45,7 @@ public:
virtual GBool interpretType3Chars() { return gFalse; }
// Does this device need non-text content?
- virtual GBool needNonText() { return gFalse; }
+ virtual GBool needNonText() { return gTrue; }
//---- get info about output device