Thumb set to height, intermediate to width? Thumb set to height, intermediate to width?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Thumb set to height, intermediate to width?

Started by coopersita, October 22, 2006, 01:58:36 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

coopersita

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.

Gizmo

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.
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

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.

Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

coopersita

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?

Stramm


coopersita

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

Stramm

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

coopersita

I tried changing line 63:

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

to

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...

Stramm

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

coopersita

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
if (!resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']))
to
if (!resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], 'ht'))

and

/util.php
Line 249
if (resize_image($image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'])){
to
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.

<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...

<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?