Page 1 of 1

convert command change in behaviour between versions

Posted: 2015-11-10T07:39:05-07:00
by furicle
Hi All

I have been using this line in a small bash script to make a thumbnail of the first page of a pdf file with a drop shadow on the whole thumbnail

Code: Select all

convert "$FILE[0]" -thumbnail 200x258 -bordercolor white -border 6 \( +clone -background black -shadow 80x3+2+2 \) +swap -background white -layers merge +repage "$FILE.gif" ;
After upgrading my OSX from 10.6 to 10.11 and reinstalling ImageMagick thru ports the output seems to have changed.
I don't know what version I was running previous (roughly three years old?) but now have
ImageMagick 6.9.2-4 Q16 x86_64 2015-11-09

I used to get something that looked like this, but now I get something that looks like this.

What makes it drop shadow each element rather then the entire thumbnail?
Assuming I have no control over the input pdf, how do I force the second behaviour every time?

Comments appreciated

Re: convert command change in behaviour between versions

Posted: 2015-11-10T10:32:10-07:00
by fmw42
see viewtopic.php?f=4&t=21269 regarding color and grayscale changes

Re: convert command change in behaviour between versions

Posted: 2015-11-11T08:52:02-07:00
by furicle
Thank you for your answer. Unfortunately either I don't understand it, or it's only a portion of the problem.

I adjusted the script to -colorspace RGB in and -colorspace sRGB out and I can see where the drop shadow is less dark.

But to me the big change was each 'item' and the INSIDE of the border is getting drop shadow now rather than just the whole thumbnail image getting one.

Stated another way - the only drop shadow I want is on the outside of the border. That's the way it used to work.

It seems like it's "smarter" now - it's seeing internal parts of the pdf that it didn't 'know' about before.
The other change I didn't mention was it used to only do the first page, now it tries to mush all the pages together.
I already updated the script to use $FILE[0] so it only operates on the first page.

Re: convert command change in behaviour between versions

Posted: 2015-11-11T09:02:39-07:00
by snibgo
furicle wrote:But to me the big change was each 'item' and the INSIDE of the border is getting drop shadow now rather than just the whole thumbnail image getting one.
This is because the image is largely transparent. The opaque parts cause shadows, which appear in transparent areas.

Re: convert command change in behaviour between versions

Posted: 2015-11-11T09:41:09-07:00
by furicle
Transparent PDF ? I didn't know that was possible. But you are right. Thanks!

I added -background white -flatten and it's behaving the way I expect it to now.

I wonder if it's a change in the input files (I don't control them) or the update that caused the change....

For the record, the line is now

Code: Select all

convert "$FILE[0]" -background white -flatten -thumbnail 200x258 -bordercolor white -border 6 \( +clone -background black -shadow 80x3+2+2 \) +swap -background white -layers merge +repage "$FILE.gif" ;

Re: convert command change in behaviour between versions

Posted: 2015-11-11T10:15:00-07:00
by fmw42
Perhaps it is due to a change in version of your Ghostscript delegate.