Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Thumb set to height, intermediate to width?  (Read 4678 times)

0 Members and 1 Guest are viewing this topic.

coopersita

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Thumb set to height, intermediate to width?
« on: October 22, 2006, 01:58:36 am »

Hi,

Is there a way to set the thumbnail size to be set to max height, but intermediate images to the width?

I have some very long images that if you set a thumnail to width woud look like lines, but if set by height in intermediate would run off the page.

Any ideas?

Thanks.
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Thumb set to height, intermediate to width?
« Reply #1 on: October 22, 2006, 03:01:32 am »

Login to Configurations => Files and thumbnails settings and change these settings:
  • Max dimension of a thumbnail = "your selected size"
  • Use dimension ( width or height or Max aspect for thumbnail ) = height
  • Max width or height of an intermediate picture/video = "your selected size"

The first 2 items will set the thumbnail size and the 3rd item controls the intermediate. Read the fine print about changing these values if you already have images in the gallery.

If you only have a few of these wide images to place into the gallery, you can upload as normal then manually recreate the thumbnails and intermediate images off-line in a graphics program and then overwrite the ones onlines. Using your FTP program, check out the directory of an album and you'll notice each image has 3 different sizes, thumbnail, normal and "original" (no prefix). Rename your new thumbnail and intermediate images using this format and you shouldn't need to overwrite the original size image. I hope this isn't too confusing so only try 1 or 2 images first.
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

coopersita

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Thumb set to height, intermediate to width?
« Reply #2 on: October 22, 2006, 04:35:07 am »

Let me see if I understand correctly. If I set the intermediate size of picture to 400 (default). Should intermediate images fit in a 400x400 box, and the orientation should only affect the thumbnails?

Because if that's the case, it's not happening... Intermediate images over 400 width are running off my page.

You can see an example here http://www.lo8os.com/gallery/displayimage.php?album=3&pos=0.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Thumb set to height, intermediate to width?
« Reply #3 on: October 22, 2006, 07:13:12 am »

Max width or height of an intermediate picture/video, will take effect when you upload a file if you change it after uploading you need to apply new setting (Update thumbs and/or resized photos) by running Admin tools
Logged
‍I don't answer to PM with support question
Please post your issue to related board

coopersita

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Thumb set to height, intermediate to width?
« Reply #4 on: October 22, 2006, 06:54:13 pm »

I've tried it, and no luck. Actually, I never changed the max size of intermediate pics. It's always been the default, but still my intermediate pictures that exceede 400 pixels width are not being reized, only when they are over 400 pixels height.

Why is that?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Thumb set to height, intermediate to width?
« Reply #5 on: October 22, 2006, 08:13:25 pm »

use max aspect instead

coopersita

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Thumb set to height, intermediate to width?
« Reply #6 on: October 22, 2006, 09:15:30 pm »

But I don't want the thumbnails to be max aspect. They should be 50 pixels height, but the intermediate size 400 pixels width.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Thumb set to height, intermediate to width?
« Reply #7 on: October 22, 2006, 09:52:51 pm »

that'll mean some editing of include/picmgmnt.inc.php
both functions in that file

coopersita

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Thumb set to height, intermediate to width?
« Reply #8 on: October 23, 2006, 01:36:58 am »

I tried changing line 63:

Code: [Select]
if (!resize_image($image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']))
to

Code: [Select]
if (!resize_image($image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], 'wd'))
But it didn't work. I tried uploading new pictures to test it, but no change...

Should I be changin a different line? It seems to be the only one that calls resize_image for normal images...
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Thumb set to height, intermediate to width?
« Reply #9 on: October 23, 2006, 07:55:01 am »

should work... have you tried uploading a pic after you did the change

coopersita

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Thumb set to height, intermediate to width?
« Reply #10 on: October 23, 2006, 07:16:16 pm »

I managed to do what I wanted... Almost.  I set max aspect in the config, and then modified the following files:

/include/picmgmt.inc.php
Line 59
Code: [Select]
if (!resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']))to
Code: [Select]
if (!resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], 'ht'))
and

/util.php
Line 249
Code: [Select]
if (resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'])){to
Code: [Select]
if (resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], 'ht')){
Now images are the right sizes, but the html still gives the old width and height, so even though the image is larger, still shows a small one. I've been looking at theme.php, but I can't find the code that uses to display the thumbnail.

Code: [Select]
<a href="thumbnails.php?album=10" class="albums"><img src="albums/userpics/10001/thumb_nabs.gif" class="image" width="30" height="50" border="0" alt="nabs.gif" /></a>
 I just want to delete the width and height...

Code: [Select]
<a href="thumbnails.php?album=10" class="albums"><img src="albums/userpics/10001/thumb_nabs.gif" class="image"  border="0" alt="nabs.gif" /></a>
Is that in theme.php, because I can't find it... or is it in another file?
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.