Does anyone know a good way to batch-convert a bunch of PNGs into JPGs in linux? (I'm using Ubuntu).
A png2jpg binary that I could just drop into a shell script would be ideal.
|
feedback
|
|
Your best bet would be to use Imagemagick I am not an expert in the actual usage, but I know you can pretty much do anything image related with this! An example is:
and it will keep the original as well as creating the converted image. As for batch. I think you need to use the Morgify tool (from the same command line when in imagemagick. The command is:
| |||||||||||||
feedback
|
|
There is no reason to install ImageMagick if it won't ever be used again. The linux convert command, as pointed out by Jeffrey, is enough. To avoid that double extension problem this is what the bash code should look like:
| |||||||||
feedback
|
|
For batch processing:
You will end up with file names like image1.png.jpg though. This will work in bash, and maybe bourne. I don't know about other shells, but the only difference would likely be the loop syntax. | |||
|
feedback
|
|
The actual "
| ||||
|
feedback
|