Converting XWD -> BMP -> PNG (transparency problem)
Posted: 2013-08-06T17:46:18-07:00
I have a script that uses xwd to grab a screenshot, then convert converts in to png.
If I screenshot a terminal with a transparent background the resulting png loses it's transparency somehow. If I convert to bmp it works fine,but converting said bmp to png again loses its transparency. If I convert to gif it works, but the image quality is quite poor.
If I use the -root option of xwd everything works fine, but that takes a shot of the whole desktop with no prompting.
I've tried playing with -alpha options etc but not found anything that works. Any ideas?
I'm not using any options:
convert screen.xwd screen.bmp
convert screen.bmp screen.png
Here's an example made with xwd -root option: http://www.r0t.co.uk/sshots/shot-2821497685.png
And this is with coverted directly to png without the -root option, http://www.r0t.co.uk/sshots/shot-7284893223.png
If I convert to bmp and display it looks correct, but doesn't convert to png properly.
If I screenshot a terminal with a transparent background the resulting png loses it's transparency somehow. If I convert to bmp it works fine,but converting said bmp to png again loses its transparency. If I convert to gif it works, but the image quality is quite poor.
If I use the -root option of xwd everything works fine, but that takes a shot of the whole desktop with no prompting.
I've tried playing with -alpha options etc but not found anything that works. Any ideas?
I'm not using any options:
convert screen.xwd screen.bmp
convert screen.bmp screen.png
Here's an example made with xwd -root option: http://www.r0t.co.uk/sshots/shot-2821497685.png
And this is with coverted directly to png without the -root option, http://www.r0t.co.uk/sshots/shot-7284893223.png
If I convert to bmp and display it looks correct, but doesn't convert to png properly.