2010-11-30 11 views

答えて

2

が...私はMagickMergeImageLayersが新しい杖を返していることを逃しました!したがってコードは次のようになります:

if(current_wand && IsMagickWand(current_wand)){ 
    status=MagickReadImage(current_wand, "test.png"); 
    if (status == MagickFalse) { 
     ThrowWandException(current_wand); 
    } 
    PixelWand *color = NewPixelWand(); 
    PixelSetColor(color, "red"); 
    MagickSetImageBackgroundColor(current_wand, color); 
    MagickWand *newwand = MagickMergeImageLayers(current_wand, FlattenLayer); 
    MagickWriteImage(newwand, "test.jpg"); 
    DestroyMagickWand(newwand); 
} 
+0

次の質問で救いの手を貸していただけますか? http://stackoverflow.com/questions/7480812/iphone-imagemagick-library-converting-from-batch-file-script-to-objective-c-usi – fuzz