By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 3169 - ksnapshot creates PNGs with meaningless pixel density
Summary: ksnapshot creates PNGs with meaningless pixel density
Status: NEW
Alias: None
Product: TDE
Classification: Unclassified
Component: tdegraphics (show other bugs)
Version: R14.0.x [Trinity]
Hardware: All Linux
: P5 normal
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2020-10-30 07:21 CDT by Jim
Modified: 2020-11-01 06:00 CST (History)
3 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim 2020-10-30 07:21:32 CDT
ksnapshot creates PNGs whose pixel density is 72,72.
This means that if, on a 144 DPI screen, you capture a 1"x1" area, the PNG information says that this is a 2"x2" image.

This "fools" software (such as TeX/LaTeX) which import these graphics and try to display them at their original size.

I note that KDE4 ksnapshot does the right thing and sets the pixel density to that of the screen from which the image is captured.

Can this be fixed (assuming it is still a problem in 14.1.x)?

Thanks.
Comment 1 Michele Calgaro 2020-10-31 21:53:02 CDT
Hi Jim,
I can't reproduce the problem. I tried to capture my full screen and save it to file and the picture size in pixel was exactly the same as my screen.
I am using R14.1.0-dev for the record, but I don't think R14.0.x would be different.
Perhaps something else affecting this on your system?
Comment 2 Jim 2020-11-01 06:00:48 CST
You are missing the point.  I didn't say the number of pixels was wrong, I was saying (not explicitly enough, my bad) that the information stored inside the PNG file which tells the number of pixels per inch is wrong.

Try the following on some PNG file (change a.png to whatever your file is called):

identify -units PixelsPerInch  -format '%x,%y\n' a.png

With my TDE ksnapshot it says
72,72
but it should say something like 
163,163
because that is the number of pixels per inch on my screen.  (In fact, with the KDE4 ksanpshot it says
162.99000000000000909,162.99000000000000909
which is ugly output, but close enough for me.

In either case (TDE, KDE4) the number of pixels is correct, and image display programs which show an image on the screen with one image pixel to one display pixel will show the expected thing in both cases.  But other programs which look at a PNG and say "how big in inches is this image" will get the wrong result.

I hope I have explained the issue sufficiently this time, if not let me know.

Thanks.