← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #256069]: Change the DPI of the screenshots taken?

 

Question #256069 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/256069

    Status: Open => Answered

RaiMan proposed the following answer:
the screenshots have the pixel density of the physical screen (usually about below 100 dpi, but e.g. Mac Retina is higher).
The dpi only says, how large an image consisting of pixels will look in a given rendering situation.

So say your monitor settings currently is 96 dpi, then an image of
100x100 pixels will show up on the monitor as a square of about 1 inch.

So when Sikuli captures an image, the image content will be exactly the
pixels currently shown on the screen.

So staying in the above example:
- if you enlarge your capture in an image browser 6 times, you will see the pixels as little squares
- take an image processing app and reprocess it to 600 dpi, then you will have an image, where now each original pixel will be a pixel square of about 6x6 pixels. how the added pixels are created depends on the processing options.
- If you now look at the image in the image browser in the same size as the 6-times-enlarged situation, you will not see any pixel squares any more and the "original" size of your image now is a square of 6 inch.

Conclusion:
dpi does not matter anything in Sikuli's capturing process, since it takes the pixels as is from the screen.

If you want images with a higher dpi value for whatever purposes, you
have to process them with some image processor app.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.