Minor bug in NtMagick demo - it simply can't run as is...
Posted: 2007-01-10T20:00:25-07:00
I downloaded 6.3.1-6, my first introduction to ImageMagick. Looking through the C source, I'm impressed by the depth of coverage, so I'm (almost) convinced this is the right choice for new project development.
I have a few concerns, though - for example:
In NtMagickView.cpp, in the function DoDisplayImage, the following snippet:
Allows the drawing code to attempt to display a non-existent bitmap, crashing the app the moment it displays after launch.
Changing this to:
Fixes that, so at least the demo will execute.
Is that an appropriate cure for a common situation like this?
I'm using Visual Studio 2005, and I run Fedora Core 5 in VMWare, with GCC, for cross platform development, soon to install Kubuntu as a cross check.
VS2005 naturally complains liberally in warnings about the CRT functions like sprintf and strcpy, but that's 'new' in this compiler.
What concerns me most are memory leaks.
The demo "UTIL_NtMagick" will show a few memory leaks if you just launch it, the close it without doing anything.
If you load an image, there's at least a few dozen (this is too long to count).
I've searched the forum on the subject, and aside from a few responses that amount to "we tried it and it doesn't leak here" - I don't find much.
I don't assume that means no one is looking.
Perhaps there's some setting (a define perhaps) I've not yet learned about that fixes this.
I have a few concerns, though - for example:
In NtMagickView.cpp, in the function DoDisplayImage, the following snippet:
Code: Select all
if (pDC != NULL )
Changing this to:
Code: Select all
if (pDC != NULL && m_Image.isValid() )
Is that an appropriate cure for a common situation like this?
I'm using Visual Studio 2005, and I run Fedora Core 5 in VMWare, with GCC, for cross platform development, soon to install Kubuntu as a cross check.
VS2005 naturally complains liberally in warnings about the CRT functions like sprintf and strcpy, but that's 'new' in this compiler.
What concerns me most are memory leaks.
The demo "UTIL_NtMagick" will show a few memory leaks if you just launch it, the close it without doing anything.
If you load an image, there's at least a few dozen (this is too long to count).
I've searched the forum on the subject, and aside from a few responses that amount to "we tried it and it doesn't leak here" - I don't find much.
I don't assume that means no one is looking.
Perhaps there's some setting (a define perhaps) I've not yet learned about that fixes this.