Re: [PHP] Resizing an image

2011-03-28 Thread Donovan Brooke

Andre Polykanine wrote:

Hi everyone,
Image  processing  is  a part of Php language completely unknown to me
:-(.
So   there  is  my task: I need to process an uploaded image. We allow
uploading  of  gif,  jpeg,  and  png images. If an image is wider than
600px, it should be proportionally resized to the width of 600px.
Yes, I've just read about ImageCopyResampled().
My questions are:
1.  what  are the restrictions of ImageCopyResampled()? Can I make a jpg
image  from  a jpg one, and a png image from a png one? And what about
gif's?
2.  I  don't  need to output the image as the script output, I need to
upload it as a file (replacing the uploaded larger file). Could I make
it with fwrite and then copy it to the server? All of the examples give 
header(image/jpeg)...
Thanks!



Hi Andre,

http://www.imagemagick.org/script/index.php

http://us.php.net/manual/en/refs.utilspec.image.php



Donovan




--
D Brooke

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



Re: [PHP] resizing an image

2002-08-29 Thread Robert Cummings

ROBERT MCPEAK wrote:
 
 Could someone show me some php that proportionally resizes an image?
 I'm collecting user sumbitted images and need them all to be within
 certain size constraints.  What's the simplest, best way to do this?
 
 Sample code would be a huge help, as I'm a newbie and have not done
 anything with PHP image processing functions.

*sheesh* read the first comment at:

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

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




RE: [PHP] resizing an image

2002-08-29 Thread Liam . Gibbs

 Could someone show me some php that proportionally resizes an image?
 I'm collecting user sumbitted images and need them all to be within
 certain size constraints.  What's the simplest, best way to do this?

Try out www.php.net/imagecopyresized or
http://www.php.net/manual/en/ref.image.php if that doesn't do your job for
you.

Although these are valid functions, you'll need the GD extension or you'll
get error messages. Make sure you have this installed first.

 Sample code would be a huge help, as I'm a newbie and have not done
 anything with PHP image processing functions.

Fraid I can't help you here. Haven't developed any, although I'm sure it's
not hard, but I'm sure someone else can provide some.

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




Re: [PHP] resizing an image

2002-08-29 Thread ROBERT MCPEAK

Sheesh, I will.  Thanks.

 Robert Cummings [EMAIL PROTECTED] 08/29/02 09:47AM

ROBERT MCPEAK wrote:
 
 Could someone show me some php that proportionally resizes an image?
 I'm collecting user sumbitted images and need them all to be within
 certain size constraints.  What's the simplest, best way to do this?
 
 Sample code would be a huge help, as I'm a newbie and have not done
 anything with PHP image processing functions.

*sheesh* read the first comment at:

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

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
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