Add border of 'cmyk(0,0,0,255)' is about 5 times slower than

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
futuramedium

Add border of 'cmyk(0,0,0,255)' is about 5 times slower than

Post by futuramedium »

Adding border of 'cmyk(0,0,0,255)' is about 5 times slower than 'cmyk(255,0,0,0)'

I process CMYK images appr. 5600x3600, and try to add black border with

Code: Select all

convert  -colorspace CMYK -depth 8 -density 150 -compress Zip -border 5 -bordercolor 'cmyk(0,0,0,255)' -debug 'All' -monitor 1.tif 2.tif
It takes 75 sec on my machine. Then I try

Code: Select all

convert  -colorspace CMYK -depth 8 -density 150 -compress Zip -border 5 -bordercolor 'cmyk(255,0,0,0)' -debug 'All' -monitor 1.tif 2.tif
and it finishes in only 15 seconds! Why?

The same difference (depending on border color) is when I add border with

Code: Select all

montage -colorspace CMYK -depth 8 -density 150 -compress Zip -geometry +5+5 -background 'cmyk(0,0,0,255)' -debug 'All' -monitor 1.tif 2.tif
and

Code: Select all

montage -colorspace CMYK -depth 8 -density 150 -compress Zip -geometry +5+5 -background 'cmyk(255,0,0,0)' -debug 'All' -monitor 1.tif 2.tif

version is 6.3.5.6

Code: Select all

xpress@computer:~$ convert -version
Version: ImageMagick 6.3.5 08/15/07 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC
futuramedium

Re: Add border of 'cmyk(0,0,0,255)' is about 5 times slower than

Post by futuramedium »

well, i found that changing 'cmyk(0,0,0,255)' to 'cmyk(0,0,0,254)' restores speed to normal

'254' suites my purpouses and problem may be considered solved. But bug (isn't it a bug?) still exists, beware :)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Add border of 'cmyk(0,0,0,255)' is about 5 times slower than

Post by magick »

Use this command to get fast proper results:
  • convert 1.tif -colorspace CMYK -bordercolor 'cmyk(0,0,0,225)' -border 5 -depth 8 -density 150 -compress Zip 2.tif
futuramedium

Re: Add border of 'cmyk(0,0,0,255)' is about 5 times slower than

Post by futuramedium »

i see
thank you!
Post Reply