BATCH_IMAGE_CONVERT(1)

πŸ“¦ version 8.12.1, in ubuntu jammy

πŸ’– BATCH_IMAGE_CONVERT πŸ’–

okay bestie, so this is batch_image_convert, and she lives in the General Commands Manual section of the manual pages β€” you know, the section where all the cute little command-line besties hang out. ✨


🌸 NAME 🌸

batch_image_convert β€” use VIPS to convert a whole set of images to a new type. not one, not two, a set. she's a multitasker. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

batch_image_convert type image1 image2 ...

✨ DESCRIPTION ✨

so here's the tea, bestie πŸ“: the first argument is the name of an image type, and then every argument after that is the name of a file you want converted into that type. like, image1, image2, and whoever else you brought along. bring the whole friend group, she can handle it. 🫢

now for the important part: VIPS can usually read pretty much almost any image type you throw at her. she's got range. but when it comes to writing?? she's picky. she can only write these:

  • VIPS
  • PNG
  • TIFF
  • PPM/PGM/PBM
  • JPEG

that's the whole list. no cap. πŸ™ˆ

also β€” and this is the slay part β€” you can specify conversion parameters right in the type name itself. yeah, in the name. iconic behavior honestly. πŸ‘‘


πŸŽ€ for example πŸŽ€

batch_image_convert tiff fred.jpg jim.png

this one will convert fred.jpg and jim.png to TIFF format. fred and jim, upgraded, together. 🌈

batch_image_convert jpeg:95 jim.png

and this one will write jim.jpeg with a 95% quality factor. look at that little :95 doing so much work. main character energy fr fr. ⭐


πŸ’€ RETURN VALUE πŸ’€

returns 0 on success and non-zero on error. that's it. that's the whole vibe check. if you get a 0, you ate. if you don't, something went sideways and you should go look at it. 😭


πŸ‘‘ SEE ALSO πŸ‘‘

  • vipsheader(1)
  • im_vips2tiff(3)
  • im_vips2jpeg(3)
  • im_vips2png(3)
  • im_vips2ppm(3)

and that's the page, bestie πŸ’œ this one came from 2 Feb 2002, straight out of the BATCH_IMAGE_CONVERT(1) manual. vintage but still serving. go convert something gorgeous. πŸ§šβœ¨πŸ’–

πŸ“¦ where this page comes from