convert bgra to png complains of no file, but file exists
Posted: 2019-09-18T16:47:07-07:00
Hello. I'm trying to convert a raw bgra-formatted image to a png on Ubuntu.
The natural command to try is
but this does not work, claiming
Running identify yields the same rather unhelpful error.
Now, at this point, I know you're thinking I'm a fool who couldn't find his image if it were in the directory in front of him. However,
says it is there, and it's full of data, and it imports into Gimp just fine if I rename it to screenshot.data.
If I run
then I get several hundred very short .png images, which isn't what I expected at all. I think I've missed something fairly fundamental, but I don't know where.
I have uploaded the sample input and output to https://filebin.net/e1bbejly48gmktnn/sc ... t=fdwiigio, which should be valid until 2019-09-14.
Thank you.
The natural command to try is
Code: Select all
convert -size 800x480 -depth 8 /tmp/screenshot.bgra /tmp/screenshot.png
Code: Select all
convert-im6.q16: unexpected end-of-file `/tmp/screenshot.rgba': No such file or directory @ error/rgb.c/ReadRGBImage/243.
convert-im6.q16: no images defined `/tmp/screenshot.png' @ error/convert.c/ConvertImageCommand/3258.
Code: Select all
$ identify -size 800x480 -depth 8 /tmp/screenshot.bgra
identify-im6.q16: unexpected end-of-file `/tmp/screenshot.bgra': No such file or directory @ error/bgr.c/ReadBGRImage/244.
Code: Select all
$ ls -la /tmp/screenshot.bgra
-rw-rw-r-- 1 david david 25165824 Sep 18 16:00 /tmp/screenshot.bgra
If I run
Code: Select all
convert -size 800x4 -depth 8 /tmp/screenshot.bgra /tmp/screenshot.png
I have uploaded the sample input and output to https://filebin.net/e1bbejly48gmktnn/sc ... t=fdwiigio, which should be valid until 2019-09-14.
Thank you.