Comments on: 4 Ways to Batch Convert Your PNG to JPG and Vice-Versa https://www.tecmint.com/linux-image-conversion-tools/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Fri, 14 Jul 2023 07:38:36 +0000 hourly 1 By: Coby Powers https://www.tecmint.com/linux-image-conversion-tools/comment-page-1/#comment-1694233 Sat, 01 Jan 2022 21:11:54 +0000 http://www.tecmint.com/?p=23336#comment-1694233 In reply to Coby Powers.

It should also be noted that this command does the opposite of what is mentioned in the article. I am converting JPGs to PNGs.

]]>
By: Coby Powers https://www.tecmint.com/linux-image-conversion-tools/comment-page-1/#comment-1694232 Sat, 01 Jan 2022 21:11:08 +0000 http://www.tecmint.com/?p=23336#comment-1694232 In reply to U R SHit.

I made some modifications to the original command to support image files with spaces in them.

All it does is use the “sed” command to replace all spaces with a backslash followed by a space.

$ ls -1 *.jpg | sed 's/ /\\ /g' | xargs -n 1 bash -c 'convert "$0" "${0%.jpg}.png"'

]]>
By: Aaron Kili https://www.tecmint.com/linux-image-conversion-tools/comment-page-1/#comment-1396928 Tue, 01 Dec 2020 06:08:17 +0000 http://www.tecmint.com/?p=23336#comment-1396928 In reply to Curious.

@Curious

Oh, yes, it should work well. Thanks for sharing this.

]]>
By: Curious https://www.tecmint.com/linux-image-conversion-tools/comment-page-1/#comment-1395306 Fri, 27 Nov 2020 11:16:37 +0000 http://www.tecmint.com/?p=23336#comment-1395306 Why use bash -c for the for loop, and not just invoke a loop directly

]]>
By: Aaron Kili https://www.tecmint.com/linux-image-conversion-tools/comment-page-1/#comment-896198 Wed, 21 Jun 2017 07:42:12 +0000 http://www.tecmint.com/?p=23336#comment-896198 In reply to Christopher Lee.

@Christopher

We will check out IrfanView. “Keeping a master png (or tiff) file from which you make lossy jpegs only as required for particular purposes”, is really worth mentioning, which we kind of forgot to point out in the article.

Many thanks for the remarks.

]]>