forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: esugrue on March 10, 2005, 04:12:32 am

Title: Using own Thumbnails
Post by: esugrue on March 10, 2005, 04:12:32 am
Hi!

I am trying to upload my own thumbnails for CPG (1.3.2) to use. I want all thumbs to be the same size (eg: 75x75)

Unfortunately I have already uploaded my images and CPG has created thumbs itself so is it possible to replace CPGs thumbs with mine.

I tried uploading my own thumbs and replacing the thumb_ files but it's still resizing them to the original thumb size it created (getting it from Sql database maybe?). Anyway around this apart from uploading all my thumbs and recreating all new galleries?

Thanks
Ernie
Title: Re: Using own Thumbnails
Post by: Joachim Müller on March 10, 2005, 09:34:19 am
upload your custom thumbs, then go to "admin tools" and chose "Update thumbs and/or resized photos" with the option "Only thumbnails" selected. Not completely sure if this does what you're up to, but worth a try. Another solution is to edit the database entries (thumbnail dimensions) directly in phpMyAdmin (or similar). Another option is to remove the width and height attributs of the <img> tag for thumbnails (with a small penalty on performance and standards compliance).

Joachim
Title: Re: Using own Thumbnails
Post by: esugrue on March 10, 2005, 03:23:11 pm
Hi:

Thanks for the help, I've tried but am still having problems.

If I upload my 75x75 thumbs and then go to Admin Tool and update thumbs it recreates the thumbs again (hence overwriting my thumbs).

I am unsure where to look to find the height/width attributes for the thumbs on the generated page. I looked in theme.php which seems to be the page that creates the output page but cannot find where it's mentioned. I was thinking maybe to try and change the page generation to height=75 width=75 rather than remove the dimensions altogether.

Since I have 14000 images already added, this maybe my best/only reasonable option.

So where can I go to change to force code the thumb size on the generated page(s)

Thanks heaps
Ernie
Title: Re: Using own Thumbnails
Post by: omniscientdeveloper on March 11, 2005, 12:50:42 am
Upload your thumbs then set the size to 75 in config. That should be all you have to do.
Title: Re: Using own Thumbnails
Post by: esugrue on March 11, 2005, 01:44:09 am
Hi!

I tried that but still no luck. Here's what I'm doing/done!

I've already added 14000 images into 200+ albums and when I added them CPG created thumbnails to 75px (max aspect) as in the config.

I want to upload my own thumbnails that are 75x75 cropped.

I have tried:

1) Simply uploading the thumbs - but the original thumb dimensions must be in the sql table as it resizes my 75x75 to what it originally created the thumbnail as (eg: 75x60, 55x75 etc).

2) I tried uploading my thumbnails (75x75) and going to Admin Tools and updating the thumbnails only, but it went through and said they were all done correctly, but it recreated all the thumbnails. So it was back to the beginning.

I can set the size in config to 75 but I only get a Height, Width or Max Aspect choice (none of which is suitable as I want all thumbs to be 75x75 cropped to aspect).

I was going to edit the thumbnail page where they were displayed but cannot find the code to edit (if I can do this at all!).

Thanks
Ernie
Title: Re: Using own Thumbnails
Post by: Venus on March 12, 2005, 05:31:27 pm
I m not sure what exactly is your problem but I have similar I've uploaded my own thumbs 75x80 and they are resized by cpg to 75x91 they look good but around them is black "border" and it is not looking good. Does anyone know if there is possibility to remove it?

(http://img29.exs.cx/img29/1104/thumby7fo.jpg) (http://www.imageshack.us)
Title: Re: Using own Thumbnails
Post by: Nibbler on March 13, 2005, 05:03:03 pm
Change to a different theme and see if the border goes away.
Title: Re: Using own Thumbnails
Post by: Venus on March 14, 2005, 06:23:12 pm
I fixed it :)

Esugrue if you go to config at put there 75 as max height it will resized your width a little but it will still looking good. I done it this way on my site and it works. I think there is no way to put them to be 75x75.