Re: image orientation/resizing images
| From: | Brian White | Date: | Wed, 21 Feb 2001 23:04:57 +0000 |
| Subject: | Re: image orientation/resizing images | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41079@lists.php.net to get a copy of this message | ||
Three quite related posts all in rapid sucesssion
At 17:48 21/02/2001 -0500, Jaxon wrote:
Is there any way to take an image from the filesystem, say a .jpg or .png, and display it in a different orientation? e.g. 20 degrees to the right?At 17:18 21/02/2001 -0500, Dale Frohman wrote:
Does anyone know of a way to resize images as they are being uploaded? Would you write these images to a mysql database or straight to a file on the server? The pictures will be small < 100kIn both cases, the answer will have to be some kind of server side utility that can dynamically feed up translated images. Chris' very nice "image from database" snippet gives a guidline on how this might work - whether or not what you want can be done in PHP, I don't know. At 08:09 21/02/2001 -0800, Chris Lee wrote:
dspimage.inc
<?php
include_once('database.egn');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
if ( $prod_r = fetch_db_value('product_image', "WHERE product_id =
$product_id ") )
{
if ($prod_r['product_image'])
{
Header("Content-Type: {$prod_r['product_image_type']}");
echo $prod_r['product_image'];
exit();
}
}
Header('Content-Type: image/gif');
readfile("$DOCUMENT_ROOT/image/nopic.gif");
?>
index.php
<?php
echo "
<img src='include/dspimage.inc?product_id=123456'>
";
?>
-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web: http://www.steptwo.com.au/
Email: bwhite@steptwo.com.au