| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
quick hack to eliminate thumbnail image jaggies (libgd req) | ||||
|
|
Thread Tools | Search this Thread |
#41
|
|||||||||
|
|||||||||
Ooops , try...
Code:
Find this code and swap out the # comment also.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#42
|
|||||||
|
|||||||
Hi Cam,
I'm sure it'll be worth it in the end. As for the unsharp php- I think the function could be added during the generation with Boomer's code. But, perhaps he can see exactly much easier than my trial and error methods. I just know that our forum has this and it generates great looking thumbnails. So I checked the image code. Quite bizarre that this hasn't been released as a complete mod with so many people wasting all the bandwidth serving images. - Mike
__________________
4.1.9 |
|||||||
#43
|
|||||||
|
|||||||
That did not make a noticable improvement. Does it matter what combination is active? For example
ImageAntiAlias($photoImage, true); and imagecopyresampled($thumb_img, $photoImage, 0,0,0,0, imagesx($thumb_img), imagesy($thumb_img), imagesx($photoImage), imagesy($photoImage)); or ImageAntiAlias($photoImage, true); and imagecopyresized($thumb_img, $photoImage, 0,0,0,0, imagesx($thumb_img), imagesy($thumb_img), imagesx($photoImage), imagesy($photoImage)); or does that not make a difference?
__________________
Xcart Version: 4.1.6 |
|||||||
#44
|
|||||||||
|
|||||||||
ImageAlphaBlending() & imagecopyresampled() would be the two calls to make to resample the image properly. I had this issue on a different server, this is why the two other functions call I left in. More than likely the answer lies in the GD library docs:
http://us3.php.net/manual/en/ref.image.php hope that helps.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#45
|
|||||||
|
|||||||
I got this resolved. It was not a problem with your code, your code works great!!! What I had done is some how managed to set the height and width values (that you had set at 75) to 7. Yet I was calling up the image at 80 in x-cart.
This is what happens when stupid people play with powerful toys!!! Thanks for all your help and for this great mod. I will be trying out the php script to get all of the images reset in the next couple of days i will let you know how it turns out. Cameron
__________________
Xcart Version: 4.1.6 |
|||||||
#46
|
|||||||
|
|||||||
second thumbnail
Hi Boomer and co
This is a great mod - so thanks very much for sharing it How difficult is it going to be to also resize the uploaded image, so that a member of staff can upload any image they have, and it creates a thumbnail for product listings etc of 70px width, but also resizes the main image to be 200px, with that image being used when people view the actual product page? Any suggestions for code to achieve this please? thanks steve
__________________
-------------- RHEL3/Apache2/PHP4/MySQL4/Plesk7.5.3 X-Cart 4.0.16 - Live X-Affiliate X-AOM ez-checkout ez-upsell -------------- |
|||||||
#47
|
|||||||
|
|||||||
If you have (and you should have something for image manipulation) Photoshop or Macromedia Fireworks you can "batch" resize your images. I created 1000 thumnail images in about 30 seconds w/fireworks
__________________
Version 4.2.3 |
|||||||
#48
|
|||||||
|
|||||||
image resizing
Yeah, but I find that some colleagues who are perfectly capable of doing everything else to add a product just don't get images - they don't see that a pixellated image, or one that hasn't maintained the ratio when being resized is not acceptible.
I'd love to be able to adapt this mod so that it creates two resized images - one at say 300x300 for the main product view, and one at 150x150 for the category list view - that would save a lot of my time redoing images and explaining why i had to! cheers steve
__________________
-------------- RHEL3/Apache2/PHP4/MySQL4/Plesk7.5.3 X-Cart 4.0.16 - Live X-Affiliate X-AOM ez-checkout ez-upsell -------------- |
|||||||
#49
|
|||||||
|
|||||||
Greetings Folks,
This Mod appears to be what I need to solve my image probs; but I am new to X-Cart, and am definitely NOT a programmer. However, I am not afraid to get my hands dirty; but obviously, I don't want to screw the system and have to completely re-install. Before I take a crack at it, can a kind person tell me whether or not this mod has been released as a complete fix - either commercially, or as a free offering, please ? With Thanks, Mike.
__________________
Web: X-Cart Gold 4.1.3 Apache 1.3.37 (Unix) Linux PHP 4.4.3 MySQL 4.1.19- standard Home PC Dev: X-Cart Gold 4.1.3 Uniform Server PHP 5.1.1 MySQL server 5.0.17 MySQL client 4.1.7 Web Server Apache/2.0.55 (Win32) |
|||||||
#50
|
|||||||||
|
|||||||||
I have a Mod that will allow you to upload one large image for the product and it will dynamically generate new images for the Product page, the Thumbs for the product listing pages, thumbnails for the shopping cart and also a popup for a detail - all from one large image. It will also do the same with Detail images, creating small thumbnails for the detail images and a popup from them. All the dimensions for each are also configurable from within Admin.
This will handle JPG, GIF and PNG images and also applies an unsharp mask to the thumbnails that it generates so that they are not blurry. This makes image management much easier and you do not have to worry about resizing in an application such as Photoshop. You would also not have to worry about creating and uploading multiple images. Let me know if anyone is interested. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|