Any tips on what I'm doing wrong?
Code: Select all
// Read in images
$image_body = NewMagickWand();
$image_header = NewMagickWand();
$border_img = NewMagickWand();
MagickReadImage($image_body, "body.png");
MagickReadImage($image_header, "header.png");
MagickReadImage($border_img, "border.png");
// Create main canvas
$main_image = NewMagickWand();
MagickSetFormat($main_image, 'PNG24');
$transparent = NewPixelWand();
PixelSetColor($transparent, 'none');
MagickNewImage($main_image, 350, 150, $transparent);
MagickCompositeImage($main_image, $image_body, MW_OverCompositeOp, 2, 26);
MagickCompositeImage($main_image, $image_header, MW_OverCompositeOp, 2, 2);
MagickCompositeImage($main_image, $border_img, MW_OverCompositeOp, 0, 0);
header("Content-Type: image/png");
MagickEchoImageBlob($main_image);