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.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Odd issues when compiling on windows

Post by el_supremo »

I have an older compiler (C++ .net 2003) but I used your source code and the list of linker dependencies from your .vcproj file and recompiled the program with a static version of 6.3.7-2. It works fine - I'm using Q8.

Pete
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

So am I facing compiler version issues? The snaps.php.net version of Imagick is behaving exactly the same way as in my tests.

Are you using static multithread version of ImageMagick?
Mikko Koppanen
My blog: http://valokuva.org
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Odd issues when compiling on windows

Post by el_supremo »

It was static single-threaded but I've just tried static multi-threaded and that works too.

Pete
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

Pete,

can you send me the project files to test with VS2005 ?
Mikko Koppanen
My blog: http://valokuva.org
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Odd issues when compiling on windows

Post by el_supremo »

http://members.shaw.ca/el.supremo/mikko_wand_test.zip

I'll delete it once you've got it.
Pete
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

el_supremo wrote:http://members.shaw.ca/el.supremo/mikko_wand_test.zip

I'll delete it once you've got it.
Pete

Got it! Thank you!
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 »

Running wand_test_STMT.exe from Release produced this image:

Image

I still see that image as black in Windows Vista image viewer and firefox. I wonder what is happening here..
Mikko Koppanen
My blog: http://valokuva.org
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Odd issues when compiling on windows

Post by el_supremo »

Running wand_test_STMT.exe from Release produced this image:
Really strange. I'm stumped.

Pete
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

el_supremo wrote:
Running wand_test_STMT.exe from Release produced this image:
Really strange. I'm stumped.

Pete
Tested wand_test_STMT.exe in several machines. The results are identical in all machines (a black image).
Mikko Koppanen
My blog: http://valokuva.org
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Odd issues when compiling on windows

Post by el_supremo »

Sorry, I only have the one machine.

Pete
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

Any of the Wizards have Windows at hand ?
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 »

How can we help?
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

To figure out why this code: http://valokuva.org/outside-blog-conten ... ckTest.rar

Creates this image: Image

This seems to be happening when linked statically in Windows.
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 downloaded your project and the ImageMagick Q16 Windows DLL binaries onto a XP box. We changed the project settings to only pick up CORE_RL_magick_.dll and CORE_RL_wand_.dll. Next we built and ran your program. We get a completely transparent PNG image as expected.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Odd issues when compiling on windows

Post by mkoppanen »

magick wrote:We downloaded your project and the ImageMagick Q16 Windows DLL binaries onto a XP box. We changed the project settings to only pick up CORE_RL_magick_.dll and CORE_RL_wand_.dll. Next we built and ran your program. We get a completely transparent PNG image as expected.
Yes, this seems to be working as expected. But you you select windows-static version it produces the images described in this thread.

This is how I do it:

1. Download windows sources
2. Compile configure.exe (Release)
3. Run configure.exe and select Multi-Thread static
4. Compile ImageMagick (Release)
5. Make a test program which uses Multi-Thread (not dll)
6. Compile and run the test program.

The binary size for statically linked program is somewhere near 4MB and incorrect images happen only when linking statically.
Mikko Koppanen
My blog: http://valokuva.org
Post Reply