Page 1 of 1

NtMagickView is broken.

Posted: 2015-04-14T18:44:15-07:00
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.

Re: NtMagickView is broken.

Posted: 2015-04-15T00:17:40-07:00
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.

Re: NtMagickView is broken.

Posted: 2015-04-16T03:05:50-07:00
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.

Re: NtMagickView is broken.

Posted: 2015-04-19T02:26:25-07:00
by shewitt.au
OK, patches sent via email. It should build ok when applied. Also added some features.