Alright, I have a bit of a dilemma I have been struggling with. I'm attempting to use ImageMagick to add a "frame", for lack of a better term, to a member profile picture. I am setting the frame icon, and then fetching the member picture, but I am getting a "Failed to read the file" exception when I try and save the file.
Here is my code:
$overlapImage = new Imagick($current_dir . "/images/EmeraldPro.png");
// This is a local function written for me that returns the content directory and image name in one string.
$member_picture = $temp_account->get_ProfileImage($member, "140", "content");
$temp_member_picture = new Imagick($member_picture);
$temp_member_picture->compositeImage($overlapImage, Imagick::COMPOSITE_ATOP, 0, 0);
try{
$temp_member_picture->writeImage($dir.$newFileName);
} catch (ImagickException $e) {
print __LINE__."
";
print $e->getMessage();exit;
}
Any help would be greatly appreciated.