fix DPI info in 16-bit PNG

Authored by Alexander Trufanov <trufanovan@gmail.com> on Mar 8 2017, 2:11 PM.

Description

fix DPI info in 16-bit PNG

REVIEW:129988

Skanlite tries to save 16bit PNG files on its own in its KSaneImageSaver class because KSaneWidget (part of libksane) uses QImage to save files and QImage doesn't support 16bit images. Related warning in libksane

But Skanlite doesn't add most of optional PNG headers to the exported png file. In particulary it misses pHYs (Physical Pixel Dimensions) info. Without it ScanTailor app can't detect scan's dpi and forces user to choose it manually while png file importing. Related issue in scantailor
I've fixed this by adding pHYs to 16bit png based on KSaneWidget::currentDPI() as KSaneWidget do it itself

Details

Committed
Alexander Trufanov <trufanovan@gmail.com>Mar 8 2017, 2:11 PM
Parents
R483:62c91d823cdd: Empty prefix handling REVIEW:129990 Currently if you use empty prefix you'll…
Branches
Unknown
Tags
Unknown
Alexander Trufanov <trufanovan@gmail.com> committed R483:9f1e7b3596b1: fix DPI info in 16-bit PNG (authored by Alexander Trufanov <trufanovan@gmail.com>).Mar 8 2017, 2:11 PM