NtMagickView is broken.

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
shewitt.au
Posts: 3
Joined: 2015-04-14T18:34:20-07:00
Authentication code: 6789

NtMagickView is broken.

Post by shewitt.au »

When building ImageMagick (Windows 7 Visual Studio 2013) I noticed that the NtMagickView utility is broken. All images display as a white rectangle.

The problem is in "NtMagickView.cpp" in the 'CNtMagickView::DoDisplayImage()' function. The 'QuantumDepth' macro is undefined (or perhaps the project file generator should have defined the 'QuantumDepth' macro). Looks like it should be 'MAGICKCORE_QUANTUM_DEPTH'.

The preprocessor logic doesn't handle the case where the macro is undefined or has an unexpected value very well at all.

Lastly, as an observation, the utility is extremely inefficient: why build the bitmap every time 'DoDisplayImage' is called? The DIB section should be cached.

Regards,
Stephen Hewitt

PS: Is there a way I can submit patches? I'm new to ImageMagick.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: NtMagickView is broken.

Post by dlemstra »

This utility was contributed a while ago and we are not actively working on it. I am happy to hear that you are :). You can submit your patches with this from: http://www.imagemagick.org/script/contact.php. If you want to use e-mail then please send me a PM and I will contact you.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
shewitt.au
Posts: 3
Joined: 2015-04-14T18:34:20-07:00
Authentication code: 6789

Re: NtMagickView is broken.

Post by shewitt.au »

@dlemstra I sent the patches as a PM because the first method didn't seem to have a mechanism to attach files. There seems to be no trace of the attachments from this end so I have no way of verifying everything went well.
shewitt.au
Posts: 3
Joined: 2015-04-14T18:34:20-07:00
Authentication code: 6789

Re: NtMagickView is broken.

Post by shewitt.au »

OK, patches sent via email. It should build ok when applied. Also added some features.
Post Reply