mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 15:39:04 +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 {
|
||||
switch (cid->spp) {
|
||||
case 1:
|
||||
colorspace.str(" /ColorSpace /DeviceGray\n");
|
||||
if (cid->bps == 1) {
|
||||
colorspace.str(" /ColorSpace /DeviceGray\n"
|
||||
" /Decode [1 0]\n");
|
||||
} else {
|
||||
colorspace.str(" /ColorSpace /DeviceGray\n");
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
colorspace.str(" /ColorSpace /DeviceRGB\n");
|
||||
|
Loading…
Reference in New Issue
Block a user