RE: [PHP] FW: Resizing Pictures

2004-04-20 Thread Vail, Warren
OK, here you have lots of options using PHP gd extensions just to start (or
not).  Just specifying width and height in your html IMG statement will
result in the image being resized by the browser, however, the entire image
file must be transferred to the browser.

http://www.php.net/manual/en/ref.image.php

As before, downsizing tends to work much better that upsizing (no pun's
intended).

http://www.php.net/manual/en/function.imagecopyresized.php

Hope this helps,  

Warren Vail

-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 8:59 PM
To: 'Warren Vail'; 'Php-General-Help'
Subject: RE: [PHP] FW: Resizing Pictures


Hi Warren,

Thanks for the reply; however, that wasn't the answer I was searching for.
Using PHP, I would like to resize a file once it's store in a directory on a
(my) webserver.  

Anyone know?

-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 11:56 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] FW: Resizing Pictures

If you don't mind doing them by hand, Window Paint can, use
Image->Stretch/Skew and Stretch by the same percentage for horizontal 
Image->and
vertical dimensions to keep the same perspective (less than 100% will reduce
the picture and more than 100% will stretch, but clarity of the image will
suffer from enlarging the image).  I would also suggest save a .bmp in the
original size for future resizing and adjusting, and save as jpg for
transferring to your website (your visitors will appreciate the smaller jpg
format).

good luck

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 8:06 PM
To: Php-General-Help
Cc: 'Ryan Schefke'
Subject: [PHP] FW: Resizing Pictures




How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?



Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] FW: Resizing Pictures

2004-04-20 Thread Hardik Doshi
You can resize a file using the GD library. Look for
the GD library functions in php manual.

Hardik Doshi

> [...]
> > Hi Warren,
> > 
> > Thanks for the reply; however, that wasn't the
> answer I was searching for.
> > Using PHP, I would like to resize a file once it's
> store in a directory on
> > a (my) webserver.
> > 
> > Anyone know?
> [...]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25ยข
http://photos.yahoo.com/ph/print_splash

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FW: Resizing Pictures

2004-04-20 Thread Brent Clark
> Grab a copy of TikiWiki - http://freshmeat.net/projects/tiki/
> It's quite a large system, but there are lots of useful libraries in it.
> lib/imagegals/imagegallib.php has a nice sample of building thumbnails 
> and smaller copies of the original as well as managing them.
> Alternatively phpgallery - http://www.giffin.org/phpgallery.php
> has a similar set of functions but you will need to scout them out.
> ( Isn't open source great - just borrow what you want :) )

Indeed it is 
There is real nice one called phpix.
This is non OO project. Might be easier to read

Kind Regards
Brent Clark

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FW: Resizing Pictures

2004-04-20 Thread Lester Caine
Ryan Schefke wrote:

How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?
Grab a copy of TikiWiki - http://freshmeat.net/projects/tiki/
It's quite a large system, but there are lots of useful libraries in it.
lib/imagegals/imagegallib.php has a nice sample of building thumbnails 
and smaller copies of the original as well as managing them.

Alternatively phpgallery - http://www.giffin.org/phpgallery.php
has a similar set of functions but you will need to scout them out.
( Isn't open source great - just borrow what you want :) )

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] FW: Resizing Pictures

2004-04-19 Thread Terence
You might want to try google, search for 'php resize image' or something
along those lines. very often there is lots of code already out there.

- Original Message - 
From: "Ryan Schefke" <[EMAIL PROTECTED]>
To: "'Warren Vail'" <[EMAIL PROTECTED]>; "'Php-General-Help'"
<[EMAIL PROTECTED]>
Sent: Tuesday, April 20, 2004 11:59 AM
Subject: RE: [PHP] FW: Resizing Pictures


Hi Warren,

Thanks for the reply; however, that wasn't the answer I was searching for.
Using PHP, I would like to resize a file once it's store in a directory on a
(my) webserver.

Anyone know?

-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 11:56 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] FW: Resizing Pictures

If you don't mind doing them by hand, Window Paint can, use
Image->Stretch/Skew and Stretch by the same percentage for horizontal and
vertical dimensions to keep the same perspective (less than 100% will reduce
the picture and more than 100% will stretch, but clarity of the image will
suffer from enlarging the image).  I would also suggest save a .bmp in the
original size for future resizing and adjusting, and save as jpg for
transferring to your website (your visitors will appreciate the smaller jpg
format).

good luck

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 8:06 PM
To: Php-General-Help
Cc: 'Ryan Schefke'
Subject: [PHP] FW: Resizing Pictures




How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?



Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] FW: Resizing Pictures

2004-04-19 Thread Red Wingate
Maybe you should take a look at PHPs Image functions, finding out which
function matches your needs is not that hard :-)

If you don't find the right functions you can also take a look at this
list's archives as this topic was raised around 5 times 04/04 :-p

 -- red

[...]
> Hi Warren,
> 
> Thanks for the reply; however, that wasn't the answer I was searching for.
> Using PHP, I would like to resize a file once it's store in a directory on
> a (my) webserver.
> 
> Anyone know?
[...]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FW: Resizing Pictures

2004-04-19 Thread Daniel Rucci
Ryan Schefke wrote:
 

How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?
 

Thanks!


im creating  a new image in this function, but you get the idea..

function generateThumb($ID)
{
$source_image   = GALLERY_ROOT . "images/". $ID . ".jpg";
$dest_image = GALLERY_ROOT  . "thumbnails/" . $ID . ".jpg";
$source_id  = imageCreateFromJPEG($source_image);
$picsize= getimagesize($source_image);
$source_x   = $picsize[0];
$source_y   = $picsize[1];
$dest_x = THUMB_X;
$dest_y = THUMB_Y;
$target_id  = imagecreatetruecolor($dest_x,$dest_y);
$target_pic = imagecopyresampled($target_id,$source_id, 
0,0,0,0,$dest_x,$dest_y,$source_x,$source_y);
return imagejpeg($target_id,$dest_image);
}

Dan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] FW: Resizing Pictures

2004-04-19 Thread Ryan Schefke
Hi Warren,

Thanks for the reply; however, that wasn't the answer I was searching for.
Using PHP, I would like to resize a file once it's store in a directory on a
(my) webserver.  

Anyone know?

-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 11:56 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] FW: Resizing Pictures

If you don't mind doing them by hand, Window Paint can, use
Image->Stretch/Skew and Stretch by the same percentage for horizontal and
vertical dimensions to keep the same perspective (less than 100% will reduce
the picture and more than 100% will stretch, but clarity of the image will
suffer from enlarging the image).  I would also suggest save a .bmp in the
original size for future resizing and adjusting, and save as jpg for
transferring to your website (your visitors will appreciate the smaller jpg
format).

good luck

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 8:06 PM
To: Php-General-Help
Cc: 'Ryan Schefke'
Subject: [PHP] FW: Resizing Pictures




How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?



Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] FW: Resizing Pictures

2004-04-19 Thread Warren Vail
If you don't mind doing them by hand, Window Paint can, use
Image->Stretch/Skew and Stretch by the same percentage for horizontal and
vertical dimensions to keep the same perspective (less than 100% will reduce
the picture and more than 100% will stretch, but clarity of the image will
suffer from enlarging the image).  I would also suggest save a .bmp in the
original size for future resizing and adjusting, and save as jpg for
transferring to your website (your visitors will appreciate the smaller jpg
format).

good luck

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 8:06 PM
To: Php-General-Help
Cc: 'Ryan Schefke'
Subject: [PHP] FW: Resizing Pictures




How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?



Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] FW: Resizing Pictures

2004-04-19 Thread Ryan Schefke
 

How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?

 

Thanks!