Download Resized - resize img to user defined values and offer download Download Resized - resize img to user defined values and offer download
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Download Resized - resize img to user defined values and offer download

Started by Stramm, October 19, 2007, 12:01:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stramm

Plugin Download Resized

What it does:
above the intermediate image a dropdown gets added. The user can select a new image resolution and the plugin will start to resize the fullsized image to the new size. When done, it displays the new resolution instead of the intermediate image and offers a download link for that pic below the dropdown.

Additional info:
If the selected size is > than the fullsized image size, no resize will be done and the fullsized gets offered for download.
The resized images temporarily gets saved in the albums/edit folder. If an image with the same name is already existing there, a index number gets added to the temp file. If the resize function is called, all files in the edit folder older than 15 mins get deleted again.

Resizing on the fly may put a lot of extra heat on your server (depending on how many users will use that feature and your server specs)

Supported langs so far:
- english
- german
- dutch

New version 1.1:
- dropdown only shows valid resize values (if fullsized < resize value than option won't show)
- dropdown doesn't show for non image files
- dutch lang file added (thanks Hein)

New version 1.2:
- detects if the modpack is installed. If so, it uses the original copy as base image and adds a watermark (if enabled) to the resized image  (downsizing of the watermark is of course supported too)

Demo:    http://stramm.st.funpic.org/displayimage.php?pos=-252

François Keller

Hi Stramm, very good plugin
french.php file attached.
A suggestion: it can be usefull, if the selected size > than the fullsize to have a warning message before uploading
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Hein Traag

Frantz, did you forget to attach your file ?

Stramm, nice work. Works flawlessly. Attached dutch.php.txt (rename it).

Cheers
Hein

François Keller

QuoteFrantz, did you forget to attach your file ?
oups! to fast  ;)
her is the file
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

just_some_guy

Good Work!

Spanish lang file attached. Would this plugin re-size the custom thumbnails of .zip files?

Thanks,
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Stramm

no, it resizes the fullsized image to a user defined size, displays the result instead of the intermediate image and offers a download link.

For custom thumbs you'll have to use this new mod for the modpack http://forum.coppermine-gallery.net/index.php?topic=47538.0
(upload images and crop [auto or manually] them for use as custom thumbs for media and image files, if images files, then the fullsized can be used to crop the thumbs too)

Davide Renda

Absolutely awesome! This is something I was silently waiting for since long long ago! Thanks, Stramm.
Italian translation attached

nish

Dear Sir,
       this is the best mod i always look for. but it resizes the images in same proportion. can we set coustom sizes. like
Best fit for you: 1280x800 (this identifice the current monitor resulution and state this)
1920x1440 | 1600x1200
1280x1024 | 1280x960
1152x864 | 1024x768
800x600 | 1920x1200
1680x1050 | 1440x900
1366x768

i like some thing like this below the thumb image. as currently it shows image above the intermediate picture. adding it below thumb can be a greate choice for user. to download the image in his required resulution.

i found a bug that the edited image do not show the alt tag write. it shows its album/edit instead of the actual alt tag.

Thanks
Nish

Joachim Müller

Shouting "bug" is not a bright idea. Name it "missing feature" if you want. However, announcement threads for plugins and mods are not the ideal place to request new features...

Stramm

in codebae.php find
$sizes = array ();
$sizes [0]['x'] = '1600';
$sizes [1]['x'] = '1440';
$sizes [2]['x'] = '1280';
$sizes [3]['x'] = '1024';
$sizes [4]['x'] = '800';
$sizes [5]['x'] = '640';
$sizes [6]['x'] = $CONFIG['picture_width'];


Here you can add sizes you need. The resize method is based on your config settings. Width and height settings don't apply cause images get resized and not cropped.

nish

Daar Admin,

I appologies for Shouting .

Great Mod Pack.

Hindi Lang added.

Nish