Yeah, Im using this code in my site.  it's working very well.

You can use ImageMagick ou GraphicsMagick.

On 03/21/2011 12:19 PM, Koen Deforche wrote:
> Hey John,
> 
> 2011/3/16 John Robson <[email protected]>:
>> Koen, sorry for the long delay too.
>>
>> I had not found examples that used the GraphicsMagick, but now its working:
> 
> Great, that means that InitializeMagick/DestroyMagick can be called
> multiple times, at least if you are including the snippet below also
> in a Wt application ?
> 
> Regards,
> koen
> 
>>
>> #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)


------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to