Image thumbnail, watermark

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi all,

Could nopcommerce include the ability to resize product image on the fly using a tool like WebImage  (MVC 3.0) http://msdn.microsoft.com/en-us/library/system.web.helpers.webimage.aspx or a free library like http://imageresizing.net/ . Currently, nopCommerce creates new image for each insert/update product, and it generates a lot of junk thumbnail that i think is not necessary. (waste of hard drive space :D)

also, there should be a watermark feature that comes with that to ink the logo or any custom image on the product pictures and that is very easy to make using WebImage


Thanks.
12 years ago
I means by using tools like WebImage, we can create any thumbnail for any image without creating a real file on the disk or on the database..

Thanks for reading.
12 years ago
does webimage store in memory or how does it not create files?

but would like to see this feature too (watermarking).
12 years ago
Hi,

You can see that i applied thumbnail creating on some of our sites. http://anculaptop.vn/  http://vatgiadaklak.vn/
though it's in webform c# 4.0 but it's the same architecture.

right click on the image, you can see that we pass the original image(big size) to the image handler to create the thumbnail (small) on real time.

I believe this is a very old technique that many asp.net sites are using.

here is a sample code of the image handler.

http://www.developerfusion.com/code/4688/dynamic-thumbnail-images-from-aspnet/
12 years ago
the method you linked to looks like it loads the full image into memory and re-creates the thumbnail every time... this seems pretty resource intensive.
12 years ago
please do understand that WebImage http://msdn.microsoft.com/en-us/library/system.web.helpers.webimage.aspx is officially made by Microsoft though i belive it uses the same image process like other link i posted

It's one of the new helper classes from System.Web.Helpers http://msdn.microsoft.com/en-us/library/system.web.helpers(v=vs.99).aspx
which contains:

- web image
- Chart
- ....

Also, Thumbnail image size is only around 3-5 kb/image. So normally we don't use that much, around 5 x 20 images = 100 kb x 1000 users online ~ 98 mb RAM usage(for image).

DDR3 Gbs today is real cheap, every server should has at least 16 gb of ram
12 years ago
congthanhgiong wrote:
DDR3 Gbs today is real cheap, every server should has at least 16 gb of ram


Performance is a MAJOR concern, especially with Google ranking pages based on load time. Shared hosting doesn't have 16gb of ram unfortunately. I wish they did :) This is why it is crucial to ensure that every component is optimized for performance, especially images because they tend to be the largest assets. As long as the image resizing is only done the first initial time and doesn't take long to process, then it shouldn't be an issue.

I recommend resizing ALL thumbnails (UPFRONT) upon creating updating category, manufacturer, and product images. This way there is no processing for viewing those pages. Currently, nopCommerce resizes the images when the product, category, manufacturer is first accessed which is slower and has to check each time.
12 years ago
I am noticing conciderable distortion of my thumb images (streched height wise).  The full image is a 600x600 image.  Can I provide the thumbnail image myself?  I was also looking for the switch to allow images to be stored outwith the DB.
12 years ago
i believe the picture function should be modified to allow both height and width of the image to be created.

The way it's doing now is just allow one length and adjust the scale to the other length but sometimes we don't need that constraint and have to manually set it on the style css.
12 years ago
I have production code running that allows setting image size by width and height, and will scale the picture down to fit inside these constraints. This can be seen running on the product and category listings on deadlywind.com where the image is sized to fit within both a max width and height. I'd be glad to contriubte this code back to the project.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.