If I have an XCF file (or any other supported by Gimp) how can I convert it to, for example, PNG for display or further processing?
相关问题
- Views base64 encoded blob in HTML with PHP
- How to get the background from multiple images by
- JQ: Select when attribute value exists in a bash a
- CV2 Image Error: error: (-215:Assertion failed) !s
- Replace image attributes for lazyload plugin on im
相关文章
- Check if directory exists on remote machine with s
- Use savefig in Python with string and iterative in
- Where does this quality loss on Images come from?
- Specifying image dimensions in HTML vs CSS for pag
- How to insert pictures into each individual bar in
- Reverse four length of letters with sed in unix
- How do I append metadata to an image in Matlab?
- Compile and build with single command line Java (L
I guess ImageMagick should do what you want (and even more)
I'm a couple of years late, but I thought I'd add what I think is by far the best solution: there is a tool suite called Xcftools (on Ubuntu,
apt-get install xcftools
), which has a utility calledxcf2png
that does this job perfectly.This is much better than a) using ImageMagick (which as I said in a comment above is horribly broken), or b) using Gimp (which has an extremely complicated scripting language for simply exporting an image).
A very good solution (and explanations!) can be found here. In short, there is a bash script feeding scheme/lisp to gimp
But look at the page for the full story. It's worth it.
If you want to bulk convert .xcf images to .png, you might find this wrapper script more useful:
Save it somewhere on your PATH as
xcftopng
(note theto
instead of2
) and call it like so:Very few, if any, programs other than GIMP read XCF files. This is by design from the GIMP developers, the format is not really documented or supported as a general-purpose file format.
That being said, look into using GIMP itself, using command line arguments (especially the
--batch
option).EDIT: It looks as if ImageMagick does support XCF, so that is probably an easier route if the support seem so be good enough. I haven't tested it, and the documentation doesn't say much. I would be a bit wary.