mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-14 08:39:27 +08:00
fix inverting (Bilevel BW png) in pdf; fixes # 2059
This commit is contained in:
parent
f27ca3e348
commit
710fa82fb0
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user