diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1999-08-06 00:14:27 (GMT) |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-08-06 00:14:27 (GMT) |
commit | 50e9d31c05e9ca11ad43cc570556094782c1b956 (patch) | |
tree | e8d30241d1f97d7a52ad4486089a74e55160ad78 /pdf/xpdf/ImageOutputDev.cc | |
parent | bd7dce23fec36adeb1713c164d594bbc0436b346 (diff) |
Painful merge.
Painful merge.
I merged the latest release into the CVS.
This version supports the regular xpdf or gpdf if the GNOME libraries
are found.
Miguel.
Diffstat (limited to 'pdf/xpdf/ImageOutputDev.cc')
-rw-r--r-- | pdf/xpdf/ImageOutputDev.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pdf/xpdf/ImageOutputDev.cc b/pdf/xpdf/ImageOutputDev.cc index 00782fb..93d1c31 100644 --- a/pdf/xpdf/ImageOutputDev.cc +++ b/pdf/xpdf/ImageOutputDev.cc @@ -90,6 +90,7 @@ void ImageOutputDev::drawImage(GfxState *state, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool inlineImg) { FILE *f; + ImageStream *imgStr; Guchar pixBuf[4]; GfxColor color; int x, y; @@ -131,20 +132,23 @@ void ImageOutputDev::drawImage(GfxState *state, Stream *str, int width, fprintf(f, "255\n"); // initialize stream - str->resetImage(width, colorMap->getNumPixelComps(), colorMap->getBits()); + imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), + colorMap->getBits()); + imgStr->reset(); // for each line... for (y = 0; y < height; ++y) { // write the line for (x = 0; x < width; ++x) { - str->getImagePixel(pixBuf); + imgStr->getPixel(pixBuf); colorMap->getColor(pixBuf, &color); fputc((int)(color.getR() * 255 + 0.5), f); fputc((int)(color.getG() * 255 + 0.5), f); fputc((int)(color.getB() * 255 + 0.5), f); } } + delete imgStr; fclose(f); } |