![]() |
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. |
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 |
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 |
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. |
Re: Resize thumbnails with GD
1 Attachment(s)
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 |
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. |
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 |
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} |
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!:D/ |
Re: Resize thumbnails with GD
cool... glad I could help.
|
All times are GMT -8. The time now is 08:48 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.