in reply to path problem with ImageMagick

Where did you set up your $myfile, $tstamp and $extension variables? They are globals I presume?

Try to print out the name of your file before you read it, that might give you more clue as why you are not reading the file correctly. :-)