spacecatninja / craft-imager-x

Image transforms, optimizations and manipulations for your Craft CMS site.
Other
26 stars 16 forks source link

FR: Transparent backgrounds using clipping path #242

Open metamachineco opened 1 year ago

metamachineco commented 1 year ago

Description

We work with product images that have a (photoshop) clipping path (Common when used in printed media). These are most of the time jpeg's. It would be nice to have a transform that takes these jpeg's, make the background transparent (based on the clipping path) and save them as png.

I've experimented with Imagick and these command do the trick.

Process a single file

magick test.jpg -clip -alpha opaque test.png

Batch process a folder

magick mogrify -clip -alpha opaque -format png *.jpg

I've attached a couple images with a clipping path if you would like to consider this FR and do some testing. test test2