Page 1 of 1

ErrorMissingDelegate when drawing to blob C++

Posted: 2013-04-30T14:55:33-07:00
by mczarnek
Hello,

I am using ImageMagick to draw a rectangle with some text on it, writing that to a blob, and then taking the data out of the blob and passing it out of my program.

Works fine when I install ImageMagick and use InitializeMagick(NULL), even if I go in and manually remove 'C:\Program Files (x86)\ImageMagick-6.8.5-Q8;' from the system path as long as I don't rename that folder (so it's obviously finding it somehow else as well).

However,we'd like to bundle the library in with everything else, so I've renamed the program files folder to tell it to use the local version which is an exact copy of the other version. I've taken all the dll's needed by the dependency walker and stuck them in the same folder and now it's initializing just fine, but was giving me an error message when I called "errorImg.font("Arial")" switching it over to: errorImg.font("@C:\\windows\\fonts\\Arial.ttf"); seems to have fixed that problem.

Now it's crashing when I try to write my data to a blob, so the biggest question is why is it any different if I initialize from the exact same files from a different path instead of the system path?

I could probably post some code if it'd help.

Thanks in advance.. this one is starting to get frustrating.
-Matt

Re: ErrorMissingDelegate when drawing to blob C++

Posted: 2013-05-01T11:33:30-07:00
by mczarnek
Sorry, I double posted this one since my title wasn't very descriptive and wasn't getting any hits and I really needed to fix it.

But after a couple very frustrating days, I fixed this one on my own. Turns out they store the path to the working library is stored in the registry.

So in case someone comes across this a year from now, here's what I did:
Go into Windows Registry and edit the 'HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/ImageMagick' registry keys so they point to the correct location.

There may be a better solution involving recompiling code or something... it seems like a bug since it is supposed to be able to work from a local directory but this does the trick for my purposes.