kermitt2 / pdfalto

PDF to XML ALTO file converter
GNU General Public License v2.0
216 stars 70 forks source link

Fix IWord::colortoString(): Round instead of truncate #158

Open th-we opened 1 year ago

th-we commented 1 year ago

Truncating (by simply casting) may result in inaccurate color values.

th-we commented 7 months ago

@kermitt2 Any chance that this can get merged? Our use case is to analyze PDFs that use color coding, but the original RGB values that were used when creating the PDFs will come out altered when simply casting the values to integers instead of rounding.