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: Size of intermediate pictures  (Read 3880 times)

0 Members and 1 Guest are viewing this topic.

michelle

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Size of intermediate pictures
« on: November 30, 2003, 02:46:53 am »

On the configuration for my gallery, I put 725 as the "max width or height of an intermediate picture", so that people who have 800x600 as their resolution won't have the sideways scroll if the image's width is too long. But I only want 725 to be the maximum width for the intermediate picture, I don't care how big the height is. If the picture is for example, 500x1000, I don't want to have a 362x725 intermediate photo, I just want it to go straight to the regular sized photo. If the intermediate pictures had the same option as the thumbnails, "use dimension (width or height or Max aspect for thumbnail)", then I'd just put "width" (I think), but there's not an option for that in this case.

Does that make any sense? Is there any way to do this?

Thanks!

(p.s. - I searched for an answer to this, but couldn't find one, so sorry if this has already been asked)
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Size of intermediate pictures
« Reply #1 on: November 30, 2003, 06:22:24 am »

The thumbnail setting also controls the intermediate setting. Both will be done the way you specify.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

michelle

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Size of intermediate pictures
« Reply #2 on: November 30, 2003, 07:07:11 am »

ahh... ok, I see now, thanks!

I want the thumbnails set to have either height or width as the max, but the intermediate to just have width as the max. If I had only width as the max for thumbnails, some of them would look abnormally large since my pictures vary a lot in width/height.

Anyone know a way of doing that, or do the settings have to be the same?
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Size of intermediate pictures
« Reply #3 on: November 30, 2003, 01:15:07 pm »

Do you know enough PHP to feel up to trying to modify it? It would be fairly easy to hard code this into your installation.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

michelle

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Size of intermediate pictures
« Reply #4 on: November 30, 2003, 03:06:05 pm »

Quote
Do you know enough PHP to feel up to trying to modify it? It would be fairly easy to hard code this into your installation.


Yeah, sure
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Size of intermediate pictures
« Reply #5 on: December 01, 2003, 12:30:51 am »

Okay, just edit the /include/picmgmt.inc.php file.  

The main code block is located at the top, and the image resize function is at the bottom.  I would copy the function, but change the name to something like normal_resize_image().

Then remove the tests for the resize method at the beginning of the copied function and leave the code for when width is selected. Change the name of the function call for when the normal picture is resized, and you should be ready to go.

As always, make a backup.

This is the block of main code of particular interest to you:

Code: [Select]

        if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate'] && !file_exists($normal))
            if (!resize_image($image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']))
                return false;
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 15 queries.