Absolute beginner! No visible picture!

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
niklas.lindblad

Absolute beginner! No visible picture!

Post by niklas.lindblad »

I'm an absolute beginner to Imagemagick and I have tried to get basic functions to work for days. Please, someone, give me a hand with pure basic knowledge.

This is the problem:
how do I write code to get a picture visible on my browser?

For an exemple, I build a first PHP-page, named test1.php contaning the following code:

Code: Select all

<?php 
system("/usr/bin/convert images/00001022.jpg -resize 50%  output.jpg");
?>
then a second page namned test2.php with this code:

Code: Select all

<?php 
echo"My testpicture <img src=\"test1.php\">";
?>
then I upload these pages to my webhotel (that is configured with imageMagick version "convert" 6.0.7 08/28/06 Q16) and surf to the page test2.php and nothing happens, the webpage says "My testpicture" and a broken img-link and nothing more.

This is most probably a pure really really beginners problem, but … it drives me totaly nuts. I have surf the web for several hours to find the answer to this beginner question, but can only find more complex questions and answers – so please, someone help me!!

Regards
Niklas
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post by Bonzo »

When you run your code an image is created in your case output.jpg - assuming you have CHMOD the foder you are working in to 777

Modify your test1.php page to this then view this page in your browser.

Code: Select all

<?php 
system("/usr/bin/convert images/00001022.jpg -resize 50%  output.jpg"); 
?>
<img src="output.jpg">
Some php examples on my site click on the www link at the bottom of this post.
niklas.lindblad

Post by niklas.lindblad »

Nothin works after chmod!

After I CHMOD the folder to 777 I get a "INTERNAL SERVER ERROR" message … whats wrong?

Sorry for these beginners questions :oops: , but I'm really stuck!

Regards
Niklas
Post Reply