fix inverting (Bilevel BW png) in pdf; fixes # 2059

This commit is contained in:
zdenop 2019-10-27 14:15:12 +01:00
parent f27ca3e348
commit 710fa82fb0

View File

@ -721,7 +721,12 @@ bool TessPDFRenderer::imageToPDFObj(Pix *pix,
} else { } else {
switch (cid->spp) { switch (cid->spp) {
case 1: case 1:
if (cid->bps == 1) {
colorspace.str(" /ColorSpace /DeviceGray\n"
" /Decode [1 0]\n");
} else {
colorspace.str(" /ColorSpace /DeviceGray\n"); colorspace.str(" /ColorSpace /DeviceGray\n");
}
break; break;
case 3: case 3:
colorspace.str(" /ColorSpace /DeviceRGB\n"); colorspace.str(" /ColorSpace /DeviceRGB\n");