Dynamically reducing image dimension as well as image size in C#
Posted
by hanesjw
on Stack Overflow
See other posts from Stack Overflow
or by hanesjw
Published on 2009-02-24T19:45:54Z
Indexed on
2010/05/08
10:48 UTC
Read the original article
Hit count: 233
I have an image gallery that is created using a repeater control. The repeater gets bound inside my code behind file to a table that contains various image paths.
The images in my repeater are populated like this
<img src='<%# Eval("PicturePath")' %>' height='200px' width='150px'/>
(or something along those lines, I don't recall the exact syntax)
The problem is sometimes the images themselves are massive so the load times are a little ridiculous. And populating a 150x200px image definitely should not require a 3MB file.
Is there a way I can not only change the image dimensions, but shrink the file size down as well?
Thanks!
© Stack Overflow or respective owner