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