Re: Copy of image -> smaller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there!

If I understand this right, I must have adminstration rights for installing Magic Wand... The problem is that my host doesn't have any support for this application. (It's not MY server)

Is there any workaround?

Best regards
/Gustav Wiberg

----- Original Message ----- From: "Sascha Braun" <contact.saschabraun@xxxxxx>
To: "Gustav Wiberg" <gustav@xxxxxxxxxxxxxx>
Sent: Monday, May 15, 2006 9:18 AM
Subject: Re:  Copy of image -> smaller


I dont have the code you need handy at the moment, but please take a look at
imagemagick.org and the

convert -size 120x80 in.jpg -resize 120x80 out.jpg

command.

First you have to use gd getimagesize command to find out
the width and height of the uploaded image, to find out if
the image has a higher width or height value.

The scale it down by the factor needed.

200 / 120 * factor i guess.

Don't forget the path in the convert command otherwise
you are going to delete the original image.

Normaly i do a copy(/tmp/file, /to/destination/path);

unlink(/tmp(file);

convert original source path to thumbnail destination path

and so forth.

When you get handy with ffmpeg you can do the same stuff
with movies. Lame helps you to do the same with audio files.

Have fun!

Sascha Braun
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux