forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: cgc0202 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.
-
Set 'Use dimension' to width.
-
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
-
The setting is used for intermediate pics too. If you have issues with the modpack then post there.
-
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
($CONFIG['thumb_use'] == "ex") ? $resize_method = "any" : $resize_method = $CONFIG['thumb_use'];
and change "any" to "wd" for width or "hd" for height
-
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
($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
-
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)
-
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
-
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
-
I couldn't find those lines of code in the include/picmgmnt.inc.php file... am I missing something?
-
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
-
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
-
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 (http://likas-philippines.org/gal004/index.php)
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 (http://likas-philippines.org/gal004/displayimage.php?album=7&pos=0&theme=classic)
After Admin Tools (simulated resize)
Test 2 (http://likas-philippines.org/gal004/displayimage.php?album=8&pos=0)
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
-
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