Odd issues when compiling on windows

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Odd issues when compiling on windows

Post by magick »

Stand by. It may take a week before we get back to you.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

Thank you!
Mikko Koppanen
My blog: http://valokuva.org
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Odd issues when compiling on windows

Post by magick »

We're using ImageMagick 6.3.7-2 and Visual Studio 7. We compiled statically as you suggested. The test.png created by your application is fully transparent as expected.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

I am using Visual Studio 2005 (VC8) in Microsoft Windows Vista. I don't really understand how this is happening but Imagick users are reporting same issues when they use the PHP extension that is linked statically.

Am I missing some compile option or do I have some unwanted switch on?

I am linking against:

Code: Select all

CORE_RL_bzlib_.lib CORE_RL_coders_.lib CORE_RL_filters_.lib CORE_RL_jbig_.lib CORE_RL_jp2_.lib CORE_RL_jpeg_.lib CORE_RL_lcms_.lib CORE_RL_libxml_.lib CORE_RL_png_.lib CORE_RL_tiff_.lib CORE_RL_ttf_.lib CORE_RL_xlib_.lib CORE_RL_wand_.lib CORE_RL_wmf_.lib CORE_RL_zlib_.lib CORE_RL_magick_.lib  winmm.lib wsock32.lib
Here is identify output generated from windows and linux generated images. Both are using the same code:

Code: Select all

Image: test.png
  Format: PNG (Portable Network Graphics)
  Class: DirectClass
  Geometry: 100x100+0+0
  Type: Bilevel
  Endianess: Undefined
  Colorspace: Gray
  Depth: 1-bit
  Channel depth:
    Gray: 1-bit
  Channel statistics:
    Gray:
      Min: 0 (0)
      Max: 0 (0)
      Mean: 0 (0)
      Standard deviation: 0 (0)
  Histogram:
     10000: (    0,    0,    0) #000000000000 black
  Rendering intent: Undefined
  Resolution: 72x72
  Units: Undefined
  Filesize: 158b
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 100x100+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Signature: 9a413b131ecf0ccfb02a837ddb33766d8604cc00da7937b79bd363b53c8d7d86
  Tainted: False
  Version: ImageMagick 6.3.7 11/19/07 Q16 http://www.imagemagick.org

Code: Select all

Image: trans_lin.png
  Format: PNG (Portable Network Graphics)
  Class: DirectClass
  Geometry: 100x100+0+0
  Type: Bilevel
  Endianess: Undefined
  Colorspace: Gray
  Depth: 1-bit
  Channel depth:
    Gray: 1-bit
    Alpha: 1-bit
  Channel statistics:
    Gray:
      Min: 0 (0)
      Max: 0 (0)
      Mean: 0 (0)
      Standard deviation: 0 (0)
    Opacity:
      Min: 1 (1)
      Max: 1 (1)
      Mean: 1 (1)
      Standard deviation: 0 (0)
  Alpha: none    #0000000000000000
  Histogram:
     10000: (    0,    0,    0,65535) #0000000000000000 none
  Rendering intent: Undefined
  Resolution: 72x72
  Units: Undefined
  Filesize: 196b
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: none
  Page geometry: 100x100+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Signature: 1bbf880a633b603cb01c2efae45fadcbec6b01f42971339ad0498d0aae910766
  Tainted: False
  Version: ImageMagick 6.3.7 11/19/07 Q16 http://www.imagemagick.org
Anything fishy in here?
Mikko Koppanen
My blog: http://valokuva.org
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

The following lines in test.png (the windows generated version) doesn't look right:

Code: Select all

Transparent color: black

Code: Select all

Histogram:
     10000: (    0,    0,    0) #000000000000 black


And another thing:

In the linux image I can see this:

Code: Select all

  Channel depth:
    Gray: 1-bit
    Alpha: 1-bit
Where the windows generated Image shows this:

Code: Select all

  Channel depth:
    Gray: 1-bit

The entry for alpha seems to be missing completely?
Mikko Koppanen
My blog: http://valokuva.org
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Odd issues when compiling on windows

Post by magick »

We get identical results for Windows and Linux (the alpha channel is present). In our tests we used an "installed" version of ImageMagick that is dependent on the Windows registry. Perhaps you are installing an "uninstalled" version which requires MAGICK_HOME to be defined for ImageMagick to find its configuration files. To investigate, set the environment variable MAGICK_DEBUG to 'configure' and run your test program. Take a look at where ImageMagick is looking for its configuration files.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

Well, that was it! I've been struggling with this for ages.

Thank you very much!
Mikko Koppanen
My blog: http://valokuva.org
Post Reply