I want to resize all existing images

baidarkabob3

Joined: 2004-10-22
Posts: 20
Posted: Tue, 2005-09-06 07:15

Hello,

I am experimenting with the most recent gallery 2 beta release and have imported some of my gallery 1 albums to see how she works.

So far I am very excited.

I am wondering though, how can I resize all images so that there are none larger than 1280 pixels wide and then set that dimension as the upper limit for all future images on the site? I have tried setting the default sizes in the root album (with the boxes checked) and then ran the maintenance rebuild option but this did not do the trick.

I see how to set defaults for standard image sizes created after upload but this does not stop folks from uploading larger images if their albums allow for it, right?

thanks,

bob

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-06 11:21

so you don't even want to keep originals that are larger than 1280px?
some people did the following:
- edit all images in g2data/albums/ with an external tool, e.g. irfanview, ps, ... with a batch program.
- tell G2 to refresh its information about the images.
i wrote once in a topic in this forum a small script which refreshed / reread the data from the files, but i tried searching it now for 15 minutes, didn't find it.
this user contributed, experimental g2 module does it only for 1 image at a time, so that's not what you want...
http://codex.gallery2.org/index.php/Gallery2:UserContributions#Modules
(reupload module)
maybe keep searching in the forums, but i don't think you'll find it :/

and if you want to limit future uploads to 1280px, use the sizelimit module of G2 (activate in site admin -> modules, configure in edit album).

 
baidarkabob3

Joined: 2004-10-22
Posts: 20
Posted: Tue, 2005-09-06 15:24

Thanks for the help valiant. I am not used to the module way of doing things yet so I guess a lot is slipping under my radar.

Thanks again,

bob

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-06 15:39

another alternative, if you don't mind losing the comments, descriptions etc:
batch resize the images in ps or irganview, install a fresh g2: then use the add from server method, 1 click adds all albums at once.

or you continue searching in the forums... i must have written this in spring or so, in one of the g2 forums.