Review for 191719

Boudewijn Rempt boud at valdyas.org
Fri Nov 6 08:27:22 CET 2009


On Thursday 05 November 2009, Cyrille Berger wrote:
> Here are two patches to fix DPI in krita for jpeg and png. I would
>  especially need someone to check units. Currently krita is consistant with
>  itself... Would be nice also, if we had the unit of resolution in the UI.
>  (and why do I have to divide by 72 ?)
> 

It looks like internally, resolution is expressed as a factor of the KOffice 
document resolution, which is 72 dpi. For instance:

QPointF KisImage::documentToPixel(const QPointF &documentCoord) const
{
    return QPointF(documentCoord.x() * xRes(), documentCoord.y() * yRes());
}

And in the dialogs, we show pixels per inch:

KisCustomImageWidget:

    doubleResolution->setValue(72.0 * resolution);
    doubleResolution->setDecimals(0);

-- 
Boudewijn Rempt | http://www.valdyas.org


More information about the kimageshop mailing list