IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
I installed all the necessary libraries and ImageMagick from source, and then installed the imagick extension. Everything looks like its in the right place (phpinfo showing imagick and all the proper formats)
I would try something simple first to get the code working and then add it into the form; echo out your variables to see if they contain what you expect.
I do not use imagick but the first time through I find I get A .png as the image so I assume the + in A+ is causing a problem. Removing the + I then get A.png which is still wrong.
Next I change $image = new Imagick($type.'.png'); to $image = new Imagick('card.png'); and I get an image of a card with the the blood group and the name putting the + back in I get an error so I assume you have to escape it in some way.
Unfortunately this didn't solve my problem! I made a copy called card.png just like you in the same directory as my script and i still get the corrupt file error!
I would not have thought it was a permission problem as your code is not saving the image just displaying it.
As I say I do not know that much about Imagick and so I can not offer any more advice; it could be a version problem. I ran it with Image magick 6.4.0-9-Q16 on a windows XP machine using XAMPP but no idea what version of Imagick I have installed.
This is the actual code I used in case I changed something else I forgot about:
I would not have thought it was a permission problem as your code is not saving the image just displaying it.
As I say I do not know that much about Imagick and so I can not offer any more advice; it could be a version problem. I ran it with Image magick 6.4.0-9-Q16 on a windows XP machine using XAMPP and Imagick 2.0.0-rc1
This is the actual code I used in case I changed something else I forgot about:
I believe it's a server configuration problem. I've been told that my Plesk control panel can get in the way. I can definitely post this on the plesk boards too but hopefully somebody here has had experience.
I only say this because it's one of the last places I have remaining to look...
You could try using php and the comand line and see what happens ( I gave up posting last night as the forum was extremly slow ) it would be quite a simple thing to do.
The + in the URL gives a problem; I have used z in the URL instead and changed it for + in the code. This save the image rather than displaying it but it should give you the idea of how it works.