xwdtopnm generates bad pnm files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netpbm-free (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
I'm trying to capture the screen to a png file, with the following command:
xwd -root -display :0 | xwdtopnm | pnmtopng > file.png
The output file is a valid png file, but it's a garbled picture.
By doing the following diagnostic steps, xwdtopnm was determined to be the problem:
xwd -root -display :0 > test.xwd ; gimp test.xwd ===> picture looks good
xwdtopnm < test.xwd > test.pnm ; gimp test.pnm ===> gimp reports "PNM Image Message: Unsupported maximum value."
pnmtopng < test.pnm > test.png ; gimp test.png ===> gimp loads a garbled picture
file test.xwd ===> file.xwd: XWD X Window Dump image data, "xwdump", 3840x1080x24
pnmtoxwd < test.pnm > test2.xwd ; gimp test2.xwd ===> gimp loads a garbled picture
Hopefully you can fix the glitch in xwdtopnm easily!
Thanks!
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: netpbm 2:10.0-15
ProcVersionSign
Uname: Linux 3.8.0-44-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.7
Architecture: amd64
Date: Thu Oct 9 11:51:37 2014
MarkForUpload: True
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
SHELL=/bin/bash
SourcePackage: netpbm-free
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | added: xenial |
Changed in netpbm-free (Ubuntu): | |
importance: | Undecided → High |
It is sad but true: More than two years later in netpbm (2:10.0-15.3) of Ubuntu 16.04.1 LTS the bug is still not fixed :-(
Fortunately, there is another tool set (ImageMagick) which has a working conversion tool (convert). So one can convert xwd output to file.png by executing:
xwd -root -display :0 | convert xwd:- file.png
I attached file "test.xwd" which shows the bug of xwdtopnm