Funky image stuff...
| From: | Shane McBride | Date: | Thu, 12 Oct 2000 20:04:52 +0000 |
| Subject: | Funky image stuff... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19874@lists.php.net to get a copy of this message | ||
I am just starting to explore the image functions within PHP.
Here's a sample of code that creates (or really just duplicated) the original picture.
<?
Header("Content-type: text/html");
$im = imagecreatefromjpeg("A-006.jpg");
Imagejpeg($im,'',100);
$width = imagesx($im);
$height = imagesy($im);
echo "Width: $width";
echo "Height: $height";
?>
How come this doesn't create any html, and won't echo the $height, and $width? It looks
like it will just create a .jpg that can only be displayed on a page by itself?
My main goal is to take a .jpg uploaded by a user and limits it's display size to less than
150px.
TIA,
Shane