Koen, sorry for the long delay too.
I had not found examples that used the GraphicsMagick, but now its working:
#include <cstring>
#include <magick/api.h>
#include "graphicsmagicks.h"
GraphicsMagicks::GraphicsMagicks(std::string in, std::string out) {
try {
ImageInfo *image_info;
ExceptionInfo exception;
InitializeMagick(0);
GetExceptionInfo(&exception);
image_info = CloneImageInfo((ImageInfo *) NULL);
const int argc = 8;
char *argv[argc] = { (char*)"convert", (char*)in.c_str(),
(char*)"-geometry", (char*)"800x800>", (char*)"-quality", (char*)"75",
(char*)out.c_str(), (char*)NULL };
int status = ConvertImageCommand(image_info, (argc-1), argv,
(char**)NULL, &exception);
DestroyImageInfo(image_info);
DestroyExceptionInfo(&exception);
DestroyMagick();
} catch (...) { }
}
in CMakeList.txt:
include_directories(/usr/include/GraphicsMagick)
target_link_libraries(GraphicsMagick)
On 03/07/2011 01:26 PM, Koen Deforche wrote:
> Hey John,
>
> Sorry for the long delay. We have worked hard on improving our
> WRasterImage lately and in the process I have been using
> graphicsmagick alot. Still, it is not entirely clear to me what is
> going wrong. But I have never used Magick++, only the C API.
>
> 2011/2/25 John Robson <[email protected]>:
>> I tried using the Magick++ in Wt, it compiles but gives error when open
>> the site.
>
> What error do you get? I would think that the only difference is that
> Wt already initializes the graphicsmagick library for you. Perhaps
> graphicsmagick cannot stand doing this twice ?
>
> If this is still troubling you, can you prepare a self-contained test
> case for the Wt version ?
>
> Regards,
> koen
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest