- Posts: 8
COMMUNITY FORUM
- Forum
- Commercial Joomla Extensions & Templates
- Simple Image Gallery PRO
- How to cut image to get proportionally different thumbnail
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.
How to cut image to get proportionally different thumbnail
- brio54
- Topic Author
- Offline
- New Member
Less
More
13 years 11 months ago - 13 years 11 months ago #37961
by brio54
How to cut image to get proportionally different thumbnail was created by brio54
I need some help. I am using galleries with a single thumbnail. Now the issue is that I want this single thumbnail to be cut out of the original image with a different proportion, not just simply resized. Right now the thumbnail is the image, which does not work unless i can request that the first image not be displayed in the gallery folder.
www.brio54-labs.com/index.php/images.html
I found the code in the sigpro_engine.php file.
// cut image if specified by user
if ($this->cut_x > 0) $orig_x = min($this->cut_x, $orig_x);
if ($this->cut_y > 0) $orig_y = min($this->cut_y, $orig_y);
Thanks,
Gernot
www.brio54-labs.com/index.php/images.html
I found the code in the sigpro_engine.php file.
// cut image if specified by user
if ($this->cut_x > 0) $orig_x = min($this->cut_x, $orig_x);
if ($this->cut_y > 0) $orig_y = min($this->cut_y, $orig_y);
Thanks,
Gernot
Please Log in or Create an account to join the conversation.
- brio54
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
13 years 11 months ago - 13 years 11 months ago #37962
by brio54
Replied by brio54 on topic Re: How to cut image to get proportionally different thumbnail
or is there any way not to display the thumbnail image in the image gallery ?
Please Log in or Create an account to join the conversation.
- brio54
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
13 years 11 months ago #37963
by brio54
Replied by brio54 on topic Re: How to cut image to get proportionally different thumbnail
upgraded to 2.5 and used the viewport without scaling the image. This did the trick, issue resolved.
Please Log in or Create an account to join the conversation.
- brio54
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
13 years 11 months ago #37964
by brio54
Replied by brio54 on topic Re: How to cut image to get proportionally different thumbnail
Well, it sort of works, but not really. The result depends on the w/h ratio difference between the source image & the thumbnail:
see example: www.brio54-labs.com/index.php/images.html
(the rendering gallery thumbnail got seriously resized because the ratios are too close.)
Is there no quick way to change the code under [ // calculate the dimensions of the thumbnail ] so the thumbnail is just cropped out of the source image without resizing it? I am not too familiar with php yet, just crossing over from flash.
thanks,
g
see example: www.brio54-labs.com/index.php/images.html
(the rendering gallery thumbnail got seriously resized because the ratios are too close.)
Is there no quick way to change the code under [ // calculate the dimensions of the thumbnail ] so the thumbnail is just cropped out of the source image without resizing it? I am not too familiar with php yet, just crossing over from flash.
thanks,
g
Please Log in or Create an account to join the conversation.
- brio54
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
13 years 11 months ago #37965
by brio54
Replied by brio54 on topic Re: How to cut image to get proportionally different thumbnail
Here is the fix that worked for me when the image/thumb have similar proportions:
EXAMPLE:
www.brio54-labs.com/index.php/images.html
CODE EDIT:
file: sigpro.engine.php
line:259 (section wide containers, wide thumbs)
original code:
if ($width > $height) { $thumb_width = $thb_width; $thumb_height = ($thb_width*$height/$width); }
modified code:
if ($width > $height) { $thumb_width = $thb_width*2; $thumb_height = ($thb_width*$height/$width)*2; }
so long,
g
EXAMPLE:
www.brio54-labs.com/index.php/images.html
CODE EDIT:
file: sigpro.engine.php
line:259 (section wide containers, wide thumbs)
original code:
if ($width > $height) { $thumb_width = $thb_width; $thumb_height = ($thb_width*$height/$width); }
modified code:
if ($width > $height) { $thumb_width = $thb_width*2; $thumb_height = ($thb_width*$height/$width)*2; }
so long,
g
Please Log in or Create an account to join the conversation.
- Katia
- Offline
- Platinum Member
Less
More
- Posts: 4696
13 years 11 months ago #37966
by Katia
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Katia on topic Re: How to cut image to get proportionally different thumbnail
Where is the SIG PRO gallery in your site?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- brio54
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
13 years 11 months ago #37967
by brio54
Replied by brio54 on topic Re: How to cut image to get proportionally different thumbnail
They are all single thumbnail galleries with modified css:
www.brio54-labs.com/index.php/rc-h1.html
www.brio54-labs.com/index.php/images.html
g
www.brio54-labs.com/index.php/rc-h1.html
www.brio54-labs.com/index.php/images.html
g
Please Log in or Create an account to join the conversation.
- Forum
- Commercial Joomla Extensions & Templates
- Simple Image Gallery PRO
- How to cut image to get proportionally different thumbnail