image output fail if source is not 24bit

Bug #261563 reported by Alex Samorukov
2
Affects Status Importance Assigned to Milestone
Cuneiform for Linux
Fix Released
Undecided
Unassigned

Bug Description

image output is broken in case if source is not 24 bit depth. Resulted files are unreadable, both in html or rtf (with image patch) modes.

Revision history for this message
Alex Samorukov (samm-os2) wrote :
Revision history for this message
Kuzemko Aleksandr (kuzemkoa-rambler) wrote :

cuneiform -o eng.rtf -f rtf English.tif
I recive normal rtf file, but image of scanner is broken.

Revision history for this message
Alex Samorukov (samm-os2) wrote :

Please, try to test this version of the patch. I found a bug inside openoffice, i`m discovering now how to make bugaround for this.

With this patch it should be visible fine in m$ word and other standard compatible products

Revision history for this message
Alex Samorukov (samm-os2) wrote :
Revision history for this message
Kuzemko Aleksandr (kuzemkoa-rambler) wrote :

I use last version of repository source code (rev 255)
cuneiform -o eng.rtf -f rtf English.tif
I receive normal rtf file, but without image.
System Gentoo amd64, OO 3.0 beta2

Revision history for this message
Alex Samorukov (samm-os2) wrote :

this is openoffice bug

Revision history for this message
Kuzemko Aleksandr (kuzemkoa-rambler) wrote :

I test it in Microsoft Office 2007. It open file correct

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Consider this one fixed then.

Changed in cuneiform-linux:
status: New → Fix Committed
Revision history for this message
Alex Samorukov (samm-os2) wrote :

Fix for the wrong bitmap header in non 24-bit modes.

The reason of bug was very simple - authors forgot that bmp data offset should calculated not only like BMPFILEHEADER+BMPINFOHEADER, but also + number of used color in palette * sizeof RGBQUAD. In case of 24 bit bitmap number of used color is always 0 (because we don`t need palette in this case), so it was ok, but not in 1 bit mode.

This patch fix this part of the problem. Another problem is inside ApplayMaskToDIB which return empty file on 64 bit platforms. As workaround it`s possible just to disable it, i see no regression on this.

Revision history for this message
Alex Samorukov (samm-os2) wrote :
Changed in cuneiform-linux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.