Resize image on upload

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
jojje
Regular
Posts: 41
Joined: Thu Dec 08, 2005 4:09 pm
Location: Sweden
Contact:

Resize image on upload

Post by jojje »

Are there anyone that could help me how to change the code so that all uploaded images is automatic resized to a width of 800px? what file handles the upload?

As I understand it does s9y creates a thumb and leaves the uploaded image untouched.

The reason for this is today's cameras with 10+ megapixels and large files. I take several 100 of photos each month and it takes to long time to open them in a editor to resize before upload.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: Resize image on upload

Post by stm999999999 »

hm, try something like Watermark
http://www.pmnet.info/watermark/index.p ... elang=true
Why waterMark V2? Not only because it's for free! waterMark V2 offers you many more features than comparable software for money. waterMark V2 guides your images out of your digicam into the internet: It reads the images in, resizes them, stamps a watermark on them and renames them logically after your user-defined pattern.
With Watermark you can batch-resize your images and so you do not have to upload your big images.
Ciao, Stephan
jojje
Regular
Posts: 41
Joined: Thu Dec 08, 2005 4:09 pm
Location: Sweden
Contact:

Re: Resize image on upload

Post by jojje »

hmm watermark could make it but that is the extra step I don't want to do. A script for Photoshop could also resize the pics...

I want the resize of the picture to be handled by s9y when I decide which pic to use and uploads it.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: Resize image on upload

Post by stm999999999 »

You do not have problem to upload such big image data through your internet connection? no problems with Max. file upload size on your server?
Ciao, Stephan
jojje
Regular
Posts: 41
Joined: Thu Dec 08, 2005 4:09 pm
Location: Sweden
Contact:

Re: Resize image on upload

Post by jojje »

I have 100M as limit for upload_max_filesize
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: Resize image on upload

Post by stm999999999 »

hm, and "Location: Sweden", you have very fast internet connections, haven't you?

So in fact you would benefit from such a function right in s9y. But AFAIK there is nothing like this resp. I do not know it.

But the core functionality should be in the code right now, so perhaps garvin can port the image-size-reduce-function for the thumbnails to the image itself?
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Resize image on upload

Post by garvinhicking »

Hi!

I think the serendipity_event_imageselectorplus plugin has an option to create other resize image variantes for a picture. Sadly I'm lacking the time to inspect this in detail, but this might get you on track?

There is a plugin event that can be used by custom plugisn to hook into the image uploading, and at that point simply resize the target image location...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply