xwdtopnm generates bad pnm files

Bug #1379480 reported by Penelope Fudd
10
This bug affects 2 people
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
ProcVersionSignature: Ubuntu 3.8.0-44.66~precise1-generic 3.8.13.25
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)

Revision history for this message
Penelope Fudd (login-launchpad-net-x) wrote :
Revision history for this message
linuxball (linuxball) wrote :

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netpbm-free (Ubuntu):
status: New → Confirmed
linuxball (linuxball)
tags: added: xenial
Revision history for this message
linuxball (linuxball) wrote :

Just for completeness I tested xwdtopnm of netpbm (2:10.0-15ubuntu2) in Ubuntu 14.04.5 LTS and I confirm that it suffers from this bug, too.

tags: added: trusty
Changed in netpbm-free (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.