| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Resize thumbnails with GD | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||||
|
|||||||||
Re: Resize thumbnails with GD
Did you take a look at phpThumb() http://phpthumb.sourceforge.net/ ?
In my opinion is far better than Smart Image Resizer. With a lot of options in the URL like Unsharp Mask, Clip, Quality, etc. Did anyone use it with X-Cart? Could you please give me more idea about Thumb Generators in PHP (Image Resizers)? I am trying to find one better the phpThumb.
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#22
|
|||||||
|
|||||||
Re: Resize thumbnails with GD
Thx for that, I will have to look into how/if you use it with xcart, since I'm not too slick in that area I don't expect much. But let me know if you figure it out, I'd be very interested to hear what you came up with.
Thx
__________________
CDSEO PRO 4.1.11 PRO Dynamic images by xcartmod.com X-Cart CSSTemplate/Skin for v4.1.11 PRO |
|||||||
#23
|
|||||||
|
|||||||
Re: Resize thumbnails with GD
It looks like its squishing it into a square thumb, anyone know how to have it size and crop to a square? I was looking at the file imager.php and it mentions some stuff about cropping, but I don't know how to implement it.
It has this: // Resizing and cropping a JPEG into a square: // <img src="/image.php/image-name.jpg?width=100&height=100&cropratio=1: 1&image=/path/to/image.jpg" alt="Don't forget your alt text" /> Help? thx
__________________
CDSEO PRO 4.1.11 PRO Dynamic images by xcartmod.com X-Cart CSSTemplate/Skin for v4.1.11 PRO |
|||||||
#24
|
|||||||||
|
|||||||||
Re: Resize thumbnails with GD
width=100&height=100&cropratio=1: 1
try to play witht he crop ration along with the width and height. maybe width=100&height=150&cropratio=1: 1.5 just a guess tho.
__________________
xcart 5.1.2 |
|||||||||
#25
|
|||||||
|
|||||||
Re: Resize thumbnails with GD
Thanks Ashley,
The problem is I can't find that code in the php or the thumbnails.tpl, (its above the "code starts here" part) the guy from post #1 figured out how to integrate this php script into xcart. Waaaay beyond me right now. His code is in post #1, the php is attached if you want to look at it. Thanks
__________________
CDSEO PRO 4.1.11 PRO Dynamic images by xcartmod.com X-Cart CSSTemplate/Skin for v4.1.11 PRO |
|||||||
#26
|
|||||||||
|
|||||||||
Re: Resize thumbnails with GD
Ok this code
// Resizing and cropping a JPEG into a square: // <img src="/image.php/image-name.jpg?width=100&height=100&cropratio=1: 1&image=/path/to/image.jpg" alt="Don't forget your alt text" /> Is a comment and has nothing to do with the actual implementation of the mod. Just follow the instructions in the first post and you should be ok.
__________________
xcart 5.1.2 |
|||||||||
#27
|
|||||||
|
|||||||
Re: Resize thumbnails with GD
I know, I already have the mod working, but it sizes/squishes instead of sizing/cropping to a square image, I was just wondering if someone out there might want to implement the cropping aspect of this php script. I am too green at this point.
thx
__________________
CDSEO PRO 4.1.11 PRO Dynamic images by xcartmod.com X-Cart CSSTemplate/Skin for v4.1.11 PRO |
|||||||
#28
|
|||||||||
|
|||||||||
Re: Resize thumbnails with GD
try this instread in product_thumbnail
{* $Id: product_thumbnail.tpl,v 1.19.2.1 2007/07/09 05:00:35 svowl Exp $ *} {if $config.Appearance.show_thumbnails eq "Y" or ($type ne "T" and $type ne "")}<img{if $id ne ''} id="{$id}"{/if} src="{if $tmbn_url}./imager.php/product_thumb.jpg?width={$image_x}&cropratio=1 :1&image={$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&id={$produc tid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} style="margin:5px;" alt="{$product|escape}" />{/if}
__________________
xcart 5.1.2 |
|||||||||
#29
|
|||||||
|
|||||||
Re: Resize thumbnails with GD
This works! No more squished thumbnails! (for those of us who don't want to photoshop every dang ol' product.)
Alright Ashley!
__________________
CDSEO PRO 4.1.11 PRO Dynamic images by xcartmod.com X-Cart CSSTemplate/Skin for v4.1.11 PRO |
|||||||
#30
|
|||||||||
|
|||||||||
Re: Resize thumbnails with GD
cool... glad I could help.
__________________
xcart 5.1.2 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|