I'm new to GraphicsMagick, and I'm trying to use Convert to set the transparent color of an image, then load the converted image into memory. All works well except when I try to load the image. Works fine the first time, but subsequent attempts (even with a different image) gets me a COM error msg stating that the program is unable to open the converted file. Here's the VB.Net code:
Dim imo As ImageMagickObject.MagickImage
imo = CreateObject("ImageMagickObject.MagickImage")
imo.Convert(src, "-transparent", decStr, destPath)
tmp = Bitmap.FromFile(destPath)
The error occurs in the imo.Convert line. If I disable tmp=Bitmap… then there is no error. Suggestions appreciated.
It seems that I broke some of the ImageMagickObject implementation for the GM 1.3 release. The bitmap functionality is likely broken. This functionality is/was likely still all working in the 1.2 releases. Someone did submit some untested patches but I have not investigated them yet. The 1.3 releases will be the end of the road for any implementation which depends on proprietary Microsoft class libraries. This means that the 1.4 release series will lack the existing simple GUI (based on MFC C++ libraries) and ImageMagickObject (based on ATL C++ libraries). New innovations will be required.
The image written to file wasn't released after Convert. Solved the problem by creating an Image.FromFile (the one written to disk) and a bitmap of equal dimension. Drew the converted image to the bitmap and disposed of the copy of the converted image. An extra trip around the block but it worked.
I'm truly disappointed to hear you'll no longer support MS. I hope you'll reconsider.
The problem with depending on proprietary libraries is an issue of licensing. We are not able to provide the source code for the proprietary libraries. The usage licenses from Microsoft have become increasingly draconian and incompatible with free software licenses such as GPL and LGPL. There is also the small problem that Microsoft Visual Studio Professional is quite expensive and the update costs are paid out of my own pocket unless a kind benefactor pays the costs. Meanwhile, it seems that the free GNU/MinGW compiler has improved dramatically and I should be able to produce good releases with it.
Support for Visual Studio is not being abandoned and it will still be possible for people to build components depending on proprietary libraries for their own use. If fixes for ImageMagickObject can be developed which get it working as originally intended, then those fixes will be included in ImageMagickObject for a 1.3.X release.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.