.tif-files and clip-paths

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
skel_

.tif-files and clip-paths

Post by skel_ »

Hi,

I just recently started using imagick, and am now trying to port my old 'convert -this -that'-code to imagick. I've gotten most of the stuff to work, apart from two issues:

1. I need to be able to convert a whole bunch of formats, including TIFF-files. Since ImageMagick have some problems with finding clip-paths in these files, I previously made a special case for them, using the following command (found elsewhere in this forum):

Code: Select all

convert filename.tif \( -clip -colorspace RGB -threshold 100% -clone 0 +clip -fill white +opaque black -negate -flatten \) -compose copy_opacity -composite filename.png
To be honest, I'm not actually sure I know what this command does, and are thus having huge problems converting it to imagick. Any ideas?

2. Some files need to be negated using negateImage, but I'm not sure which ones. Running the command for all files results in some files beeing negated when they shouldn't be. Is there any way to find out which images need to be negated?

Thanks in advance!

/ Per Holmäng
Post Reply