[nycphp-talk] Resize pictures before uploading
Dell Sala
dell at sala.ca
Wed Jul 11 10:01:31 EDT 2007
On Jul 11, 2007, at 7:51 AM, tedd wrote:
> On Wednesday 20 Jun 2007 21:42:13 Nelly Yusupova wrote:
>>
>> Is there a script or any way I can resize the pictures before
>> uploading?
>
> Nelly:
>
> Sure, you'll have to write something client-side, namely javascript
> to do it. But, there's all sorts of javascript scripts to resize
> images available to choose from, try Google "resize images javascript"
I don't believe there is any way to actually modify and image file on
the client-side using Javascript. (If someone knows a way, I'd love
to hear about it!) For client-side image processing you'd need use a
technology that has image resampling capabilities, and possibly
something that has write permissions on the client's machine. First
thing that comes to mind is a Java applet.
php Gallery created a desktop client that serves a similar purpose,
but I'm pretty sure it's specific to the php Gallery API. But this
gives you an idea of what it would take to implement client-side
image resizing... probably Java.
http://codex.gallery2.org/Gallery_Remote
> Here's one that should do with a little work:
>
> http://www.xs4all.nl/~sbpoley/webmatters/resize.html
This is cool, but it doesn't actually resize the image. It just
displays different pre-sized images that are already on the server.
> Here's one that allows the user to crop and resize their pictures.
>
> http://mondaybynoon.com/2007/01/22/crop-resize-with-javascript-php-
> and-imagemagick/
Also cool stuff, but all the processing happens on the server-side.
-- Dell
More information about the talk
mailing list