ImageMagick7 runs much slower than version6
ImageMagick7 runs much slower than version6
Hi,
according to the issue I mentioned in this post https://www.imagemagick.org/discourse-s ... 75#p169375
I try IM7 and looks like the issue got fixed, but the same command I used, but it is much slower
anyone knows why and how to fix it?
command I used:
convert img.png -resize 4500x5400! img_scale6.png
convert shirt.png -trim +repage -bordercolor none -border 5 shirt3.png
IM7 version: libMagickCore-7.Q16HDRI.so.6
according to the issue I mentioned in this post https://www.imagemagick.org/discourse-s ... 75#p169375
I try IM7 and looks like the issue got fixed, but the same command I used, but it is much slower
anyone knows why and how to fix it?
command I used:
convert img.png -resize 4500x5400! img_scale6.png
convert shirt.png -trim +repage -bordercolor none -border 5 shirt3.png
IM7 version: libMagickCore-7.Q16HDRI.so.6
Last edited by niyanwen on 2019-10-07T14:18:28-07:00, edited 1 time in total.
Re: ImageMagick7 runs much slower than version6
Hi,
according to the issue I mentioned in this post https://www.imagemagick.org/discourse-s ... 75#p169375
I try IM7 and looks like the issue got fixed, but the same command I used, but it is much slower
anyone knows why and how to fix it?
command I used:
convert img.png -resize 4500x5400! img_scale6.png
convert shirt.png -trim +repage -bordercolor none -border 5 shirt3.png
IM7 version: libMagickCore-7.Q16HDRI.so.6
according to the issue I mentioned in this post https://www.imagemagick.org/discourse-s ... 75#p169375
I try IM7 and looks like the issue got fixed, but the same command I used, but it is much slower
anyone knows why and how to fix it?
command I used:
convert img.png -resize 4500x5400! img_scale6.png
convert shirt.png -trim +repage -bordercolor none -border 5 shirt3.png
IM7 version: libMagickCore-7.Q16HDRI.so.6
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick7 runs much slower than version6
It is slower in part because IM 7 is built with HDRI by default. You can recompile without HDRI and you can recompile with Q8 in place of the default Q16.
With IM 7, use magick in place of convert.
The issue may have been fixed simply by using a more current version of libpng or if the IM 7 has lcms.
Check your version of libpng and also if lcms in included.
for the libpng
to see your delegate list
With IM 7, use magick in place of convert.
The issue may have been fixed simply by using a more current version of libpng or if the IM 7 has lcms.
Check your version of libpng and also if lcms in included.
Code: Select all
convert -list format
Code: Select all
convert -version
Re: ImageMagick7 runs much slower than version6
I don't know why I always see this error when I am using image magick 7
./convert: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6: cannot open shared object file: No such file or directory
./convert: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6: cannot open shared object file: No such file or directory
Re: ImageMagick7 runs much slower than version6
okay make it work
when I run convert -list format
PNG* rw- Portable Network Graphics (libpng 1.6.28)
See http://www.libpng.org/ for details about the PNG format.
PNG00* rw- PNG inheriting bit-depth, color-type from original, if possible
PNG24* rw- opaque or binary transparent 24-bit RGB (zlib 1.2.11)
PNG32* rw- opaque or transparent 32-bit RGBA
PNG48* rw- opaque or binary transparent 48-bit RGB
PNG64* rw- opaque or transparent 64-bit RGBA
PNG8* rw- 8-bit indexed with optional binary transparency
when I run convert version, I got
Version: ImageMagick 7.0.8-37 Q16 x86_64 2019-09-13 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib fontconfig freetype jng jp2 jpeg lcms png raw tiff webp xml zlib
when I run convert -list format
PNG* rw- Portable Network Graphics (libpng 1.6.28)
See http://www.libpng.org/ for details about the PNG format.
PNG00* rw- PNG inheriting bit-depth, color-type from original, if possible
PNG24* rw- opaque or binary transparent 24-bit RGB (zlib 1.2.11)
PNG32* rw- opaque or transparent 32-bit RGBA
PNG48* rw- opaque or binary transparent 48-bit RGB
PNG64* rw- opaque or transparent 64-bit RGBA
PNG8* rw- 8-bit indexed with optional binary transparency
when I run convert version, I got
Version: ImageMagick 7.0.8-37 Q16 x86_64 2019-09-13 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib fontconfig freetype jng jp2 jpeg lcms png raw tiff webp xml zlib
Re: ImageMagick7 runs much slower than version6
is is because of missing lcms so cause this issue?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick7 runs much slower than version6
Not if you are not using profiles. But it could be the libpng version. When using IM 7, use magick not convert; otherwise, you may be getting IM 6 behavior. Try
Code: Select all
magick -version
Code: Select all
magick -list format
Re: ImageMagick7 runs much slower than version6
Version: ImageMagick 7.0.8-37 Q16 x86_64 2019-09-13 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib fontconfig freetype jng jp2 jpeg lcms png raw tiff webp xml zlib
PNG* rw- Portable Network Graphics (libpng 1.6.28)
See http://www.libpng.org/ for details about the PNG format.
PNG00* rw- PNG inheriting bit-depth, color-type from original, if possible
PNG24* rw- opaque or binary transparent 24-bit RGB (zlib 1.2.11)
PNG32* rw- opaque or transparent 32-bit RGBA
PNG48* rw- opaque or binary transparent 48-bit RGB
PNG64* rw- opaque or transparent 64-bit RGBA
PNG8* rw- 8-bit indexed with optional binary transparency
looks like it is same
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib fontconfig freetype jng jp2 jpeg lcms png raw tiff webp xml zlib
PNG* rw- Portable Network Graphics (libpng 1.6.28)
See http://www.libpng.org/ for details about the PNG format.
PNG00* rw- PNG inheriting bit-depth, color-type from original, if possible
PNG24* rw- opaque or binary transparent 24-bit RGB (zlib 1.2.11)
PNG32* rw- opaque or transparent 32-bit RGBA
PNG48* rw- opaque or binary transparent 48-bit RGB
PNG64* rw- opaque or transparent 64-bit RGBA
PNG8* rw- 8-bit indexed with optional binary transparency
looks like it is same
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick7 runs much slower than version6
As I mentioned before, IM 7 has HDRI enabled by default. IM 6 does not. What are the resourced for both?
Or check your policy.xml file.
Code: Select all
convert -list resource
Code: Select all
magick -list resource
Re: ImageMagick7 runs much slower than version6
the output of those commands are same, is there a way to disable the HDRI in command? now I switch to IM7 and it is 5x times slower than IM6
Resource limits:
Width: 107.374MP
Height: 107.374MP
Area: 63.2173GP
List length: unlimited
Memory: 29.4378GiB
Map: 58.8757GiB
Disk: unlimited
File: 49151
Thread: 16
Throttle: 0
Time: unlimited
Resource limits:
Width: 107.374MP
Height: 107.374MP
Area: 63.2173GP
List length: unlimited
Memory: 29.4378GiB
Map: 58.8757GiB
Disk: unlimited
File: 49151
Thread: 16
Throttle: 0
Time: unlimited
Resource limits:
Width: 107.374MP
Height: 107.374MP
Area: 63.2173GP
List length: unlimited
Memory: 29.4378GiB
Map: 58.8757GiB
Disk: unlimited
File: 49151
Thread: 16
Throttle: 0
Time: unlimited
Resource limits:
Width: 107.374MP
Height: 107.374MP
Area: 63.2173GP
List length: unlimited
Memory: 29.4378GiB
Map: 58.8757GiB
Disk: unlimited
File: 49151
Thread: 16
Throttle: 0
Time: unlimited
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick7 runs much slower than version6
Are you sure you are listing information for two different ImageMagick versions? Did you put the full path to convert and to magick for IM 6 and for IM 7 when running the commands.
As far as I know, you have to recompile with --disable HDRI in your .configure script.
As far as I know, you have to recompile with --disable HDRI in your .configure script.
Re: ImageMagick7 runs much slower than version6
I am listing it only for IM7, I only have IM7 in this host
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick7 runs much slower than version6
I asked you to compare the resources between IM 6 and IM 7 to see if you need to match the IM 6 resource limits with IM 7. But it looks to me like you have enough resources on your IM 7. The only other thing to consider is if you disable OpenMP. On some platforms and commands it might run slower. That would require you to recompile. But you can limit the threads to 1 in your command line to see if that would help.
magick -limit thread 1 input ... output
As I mentioned before, you will improve speed if you do not write your command as two commands, but combine as one. That way you do not waste time writing the intermediate file to disk.
magick -limit thread 1 input ... output
As I mentioned before, you will improve speed if you do not write your command as two commands, but combine as one. That way you do not waste time writing the intermediate file to disk.
Re: ImageMagick7 runs much slower than version6
is there a way I can combine these two commands into one?
so this is first command:
convert a.png -resize 4500x5400! b.png
this second command:
convert b.png -format %@ -write info: -trim +repage -bordercolor none -border 5 c.png
so this is first command:
convert a.png -resize 4500x5400! b.png
this second command:
convert b.png -format %@ -write info: -trim +repage -bordercolor none -border 5 c.png
Re: ImageMagick7 runs much slower than version6
looks like I make it combine by this:
convert src.png -resize 4000x5000! -format %@ -write info: -trim +repage -bordercolor none -border 5 dest.png
convert src.png -resize 4000x5000! -format %@ -write info: -trim +repage -bordercolor none -border 5 dest.png