Store Image in fix size

Posted by Sushant under ASP.NET on 3/23/2013 | Points: 10 | Views : 1410 | Status : [Member] | Replies : 2
i want to store image in database but prob is it should be stored in particular size(fix size)
plz help
thanks

Sushat


Responses

Posted by: Jayakumars on: 3/23/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi try this Code

System.Drawing.Image img = System.Drawing.Image.FromStream(FileUpload1.PostedFile.InputStream);
img.width and img.height


Mark as answer if it is useful to u.

Mark as Answer if its helpful to you

Sushant, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: aswinialuri-19361 on: 3/23/2013 [Member] Starter | Points: 25

Up
0
Down
Hi
try this code for that you will mention the particular length for image

FileUpload1.PostedFile.ContentLength == "1024" so you have to mention the fixed size in content length.

or else

you have to mention the image height and width in aspx page then you will get it.

Thanks &Regards
Aswini Aluri

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Sushant, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response