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: Is it possible to have "Fixed" width for the intermediate image?  (Read 7498 times)

0 Members and 1 Guest are viewing this topic.

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Is it possible to have "Fixed" width for the intermediate image?
« on: November 05, 2006, 11:57:08 pm »

Hello,

In the  "Files and thumbnails settings"

One of the choices allowed was this:

Max width or height of an intermediate picture/video **

Is there a way around this so that it is not "either/ or" option for the width or the height; but  rather to  have fixed width (+++) for the size of the intermediate image?  I consider the changing width rather distracting and not very appealing for the slide show. 

I realize that fixing the width can cause its own problem when there is an extreme ration between the width and height, but those are seldom encountered.

CGC
_______________
(+++) such options are allowed in the thumbnails that I do not use, and opted for the "exact" size of the thumbnail that could be enabled by the Stramm mode.
Logged

Nibbler

  • Guest
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #1 on: November 06, 2006, 12:07:56 am »

Set 'Use dimension' to width.
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #2 on: November 06, 2006, 03:11:23 am »

Set 'Use dimension' to width.

That is for thumbnail Nibbler.  I have that as exact, so that I can have fixed width and height for all the thumbnails. There is not the same feature to set the same for the intermediate file size.

CGC
Logged

Nibbler

  • Guest
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #3 on: November 06, 2006, 12:38:04 pm »

The setting is used for intermediate pics too. If you have issues with the modpack then post there.
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #4 on: November 06, 2006, 01:01:30 pm »

if you use 'exact', then the modpack checks if it's resizing a thumb or the intermediate, only the thumbs get cropped, for the intermediate image the modpack's using 'max aspect'.

To change this behaviour you'll have to modify include/picmgmnt.inc.php... find
Code: [Select]
($CONFIG['thumb_use'] == "ex") ? $resize_method = "any" : $resize_method = $CONFIG['thumb_use'];
and change "any" to "wd" for width or "hd" for height

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #5 on: November 07, 2006, 03:01:31 am »

if you use 'exact', then the modpack checks if it's resizing a thumb or the intermediate, only the thumbs get cropped, for the intermediate image the modpack's using 'max aspect'.

To change this behaviour you'll have to modify include/picmgmnt.inc.php... find
Code: [Select]
($CONFIG['thumb_use'] == "ex") ? $resize_method = "any" : $resize_method = $CONFIG['thumb_use'];
and change "any" to "wd" for width or "hd" for height

Thanks Stramm,

To clarify, I still want the thumbnails and mini "exact" (I am using a square right now), but I want the intermediate to be fixed width.

And, is there a need to update, after the change is done?  Or, the Admin Tools approach be sufficient to make the changes in the resizing -- without any need for update?

Thanks.

CGC



Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #6 on: November 07, 2006, 11:35:27 am »

as already statet, this'll change the resize method for the intermediate image when you set 'exact' in config. Thumbs, minithumbs will stay cropped

Of course you'll need to recreate the intermediate images (admin tools). No further update??? needed (afaik, but I haven't tested this hack... that's your part)

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #7 on: November 07, 2006, 05:09:15 pm »

as already statet, this'll change the resize method for the intermediate image when you set 'exact' in config. Thumbs, minithumbs will stay cropped

Of course you'll need to recreate the intermediate images (admin tools). No further update??? needed (afaik, but I haven't tested this hack... that's your part)

OK, thanks for clarifying Stramm.  I can do the rest.  I just want to make sure because I have thousands of pics in the database already. I will test it with a new gallery instead of my actual site.

Thanks again.

Cornelio
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #8 on: March 26, 2007, 02:51:31 am »

Hi Stramm,

Just an update on this.  The constant width, as outlined above (using the modified script), works when the "batch upload" or  "upload file" procedure -- when the photos are first processed.  However, when I have to do any "resizing" using the "Admin Tools", the resized intermediate image reverts back to the default setting (i.e., either width or height becomes the max intermediate size) rather than as specified in the script modification -- constant width (or a larger height for vertical images).

Cornelio
Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #9 on: March 26, 2007, 02:57:15 am »

I couldn't find those lines of code in the include/picmgmnt.inc.php file... am I missing something?
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #10 on: March 26, 2007, 08:19:37 am »

Hi Stramm,

Just an update on this.  The constant width, as outlined above (using the modified script), works when the "batch upload" or  "upload file" procedure -- when the photos are first processed.  However, when I have to do any "resizing" using the "Admin Tools", the resized intermediate image reverts back to the default setting (i.e., either width or height becomes the max intermediate size) rather than as specified in the script modification -- constant width (or a larger height for vertical images).

Cornelio

hmm.. yes, you'll have to search through util.php and find similar code as in picmgmnt.inc.php (the one you just edited) and modify it as well. I forgot that I had to do a big bunch of modifs there as well for img recreation

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #11 on: March 26, 2007, 08:21:28 am »

I couldn't find those lines of code in the include/picmgmnt.inc.php file... am I missing something?

hmm.. I copy/ paste the code line I posted above into the search box of my editor and it spits out (for picmgmnt.inc.php modpack v1 1.4.10) line 70. This may be different for other versions

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #12 on: March 27, 2007, 04:39:18 pm »

hmm.. yes, you'll have to search through util.php and find similar code as in picmgmnt.inc.php (the one you just edited) and modify it as well. I forgot that I had to do a big bunch of modifs there as well for img recreation

Hi Stramm,

This further correction did not work.

This is what I changed the
util.php:
($CONFIG['thumb_use'] == "ex") ? $resize_method = "wd" : $resize_method = $CONFIG['thumb_use'];

picmgmt.inc.php
($CONFIG['thumb_use'] == "ex") ? $resize_method = "wd" : $resize_method = $CONFIG['thumb_use'];

website
CPGv1410-Stramm modpack

Please select the Classic theme (the theme selector is at the bottom)  to view images. [The Supernova theme used here has been changed so that the overlay.gif masks the full size image.  There is still a "bug" possibly because the displayed image was the full size rather than the intermediate size -- this was reported in the appropriate thread.]

Batch upload results:
The constant width was apparent, see for example:
Test 1

After Admin Tools (simulated resize)
Test 2

Before the "Admin Tools", the intermediate size for the Test2, following the Batch Upload, had a fixed width as the Test 1 image.  However, after the Admin Tools (simulated resize), the fixed width was "overridden", in spite of the util.php modification.

Cornelio

Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Is it possible to have "Fixed" width for the intermediate image?
« Reply #13 on: March 27, 2007, 05:08:20 pm »

make sure you have overwritten the original modpack util.php

other than that I can't give you much advice. That's cause I do not use the modifications you made and therefore I'm not able to recreate your results. And in addition to that I even do not know your settings

Just from the logic I'd say it'll should work as expected
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.