when installing Imagemagick-6.4.4 from source, error occurs

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
bjcuplily001

when installing Imagemagick-6.4.4 from source, error occurs

Post by bjcuplily001 »

when installing Imagemagick-6.4.4 for Windows from source, the procedure is like that:
(1) Firstly with Visual Studio 6, I build the configure.dsw workspace in ImageMagick-6.4.4\VisualMagick\configure (use release), and then run it;

(2) Secondly, I open the VisualDynamicMT.dsw or VisualStaticMT.dsw (generated by step 1), set All project as active project, then clean and rebuild all. At this time, I got one error "..\ImageMagick-6.4.4\magick\string.c(1016) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64"

As someone said, I modified the ..\ImageMagick-6.4.4\magick\string.c 1106 line as "length=(double) ((MagickOffsetType) size);", redo above procedures, but I got three errors "
..\ImageMagick-6.4.4\Magick++\lib\Image.cpp(1528) : error C2065: 'RandomThresholdImageChannel' : undeclared identifier
..\ImageMagick-6.4.4\Magick++\lib\Image.cpp(1906) : error C2065: 'SparseColorImage' : undeclared identifier
..\ImageMagick-6.4.4\Magick++\lib\Image.cpp(1907) : error C2440: 'initializing' : cannot convert from 'int' to 'struct MagickCore::_Image *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
ImageRef.cpp"

How should I do to solve this problem? And need I change the Visual Studio 6.0 to Visual Studio 2005 or other version? Pls help me , thx.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by magick »

Add RandomThresholdImageChannel and SparseColorImage to Magick++/lib/Magick++/Include.h and that should permit ImageMagick to build. In the mean-time we have patched ImageMagick to resolve these problems.
bjcuplily001

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by bjcuplily001 »

Thx. But can u give me some example code? I don't know what is SparseColorImage or RandomThresholdImageChannel? Thanks once more.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by magick »

The simplest solution is to grab the very latest ImageMagick Windows distribution. It has the patch that addresses the problem you posted. If that fails for you, let us know.
bjcuplily001

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by bjcuplily001 »

Yes. The new imagemagick worked . Thx once more. :)

Now Another question:
In which file I can add the configure option "--enable-lzw" ? Is it ..\ImageMagick-6.4.4\Makefile.in? And can u give me some example code or any other reference code? Expecting to ur answer.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by magick »

There is no --enable-lzw option. Support for LZW compression is enabled by default.
bjcuplily001

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by bjcuplily001 »

Then how about the windows binaries, is the lzw compression enabled by default? It is our understanding that it is not, which is why we are trying to generate our own binaries from source to install. We need to install a copy of imagemagick with lzw compression enabled to process gif images of smaller sizes.

We need to install a copy of imagemagick with lzw compression enabled to be able to give us gif images of smaller kb sizes.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by magick »

LZW compression has been enabled by default in all distributions of ImageMagick since the patent expired some 7 or 8 years ago.
dandes

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by dandes »

Magick:
I don't think you are right. I tried creating a gif using -compression lzw and -compression none and got exactly the same thing!
Gifs from IM are definitely "larger than expected."
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by magick »

Ok, double checked, LZW compression is enabled. If your GIF's are larger then expected post an example. We created a few GIF's and they were comparable in size to other open-source programs such as netpbm. We're using ImageMagick 6.5.1-6, the current release.
dandes

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by dandes »

Ok - the files are available here

http://www.redactive.com/download/im_lzw_issue

There are 4 jpgs, and two batch files - one runs the IM command to create an animated GIF with LZW (compress lzw), the other without (compress none). Both create an animated gif of 99K. I'm confused - why would they be the same?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: when installing Imagemagick-6.4.4 from source, error occurs

Post by magick »

ImageMagick LZW-compresses GIF images in all cases. Other compression options are ignored (at least for GIF).
Nico
Posts: 1
Joined: 2012-05-21T16:36:11-07:00
Authentication code: 13

Re: when installing Imagemagick-6.4.4 from source, error occ

Post by Nico »

Hi,

I am trying to compress a GIF image from code using the COM+ libraries available.
Version used is: 6.7.6 Q16.

Can someone please let me know if LZW is enabled for this version or how can compress further a gif image?

Thank you in advance
Post Reply