imagick
imagick copied to clipboard
Importing clipping path to jpeg file
Hello!
Is there a way to import clipping path from SVG into a jpeg file with Imagick?
Currently, I am successfully extracting the path from 8bim with this command identify -quiet -format "%[8BIM:1999,2998:#1]" masked-image.jpg >clipping.svg
, but I am wondering is there any way to "reverse" this, and is it possible?
Thank you in advance, Danail
I'll be very happy if some expert resolves is it possible ... This will be very useful for my project too!
tbh, I've never seen that feature in ImageMagick.
Can you give me a runnable example? i.e. I guess I need the source images.
This will copy 8bim profile for the image, the clipping path is inside in a SVG format:
$ImagickTarget->setImageProfile("8bim", $fromImagick->getImageProfile("8bim"));
The drawback is destroying the color profile
Sadly IM handles image profiles only as binary blobs, even they have official documentation: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/
I'm looking forward to building such an 8bim parser, but binary is not my "thing"
just found out this: https://github.com/ImageMagick/ImageMagick/issues/55#issuecomment-157157041
Making a binary parser for 8bim will be waste of time!