summaryrefslogtreecommitdiff
path: root/print/xpdf/patches/patch-ar
blob: 48dff81936e927b95593a534f4cd2e568d0ed886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$NetBSD: patch-ar,v 1.4 2008/04/20 15:48:12 tonnerre Exp $

--- xpdf/GfxState.cc.orig	2008-02-09 12:46:17.000000000 +0100
+++ xpdf/GfxState.cc
@@ -3349,6 +3349,12 @@ GfxImageColorMap::GfxImageColorMap(int b
   maxPixel = (1 << bits) - 1;
   colorSpace = colorSpaceA;
 
+  // this is a hack to support 16 bits images, everywhere
+  // we assume a component fits in 8 bits, with this hack
+  // we treat 16 bit images as 8 bit ones until it's fixed correctly.
+  // The hack has another part on ImageStream::getLine
+  if (maxPixel > 255) maxPixel = 255;
+
   // initialize
   for (k = 0; k < gfxColorMaxComps; ++k) {
     lookup[k] = NULL;