Bonjour à tous![]()
Mon pb aujourd'hui est que je dois afficher dans un datalist un image genre une vignette pour avoir une idée de la photo...
J'arrive a afficher l'image en taille réelle ms je ne sais pas comment faire pour la redimenssionner....![]()
Voici mon code
Voila HELP ME PLEASE
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 byte[] mon_img = (byte []) dS.Tables["recupPhotos"].Rows[0]["img"]; string nomImg =dS.Tables["recupPhotos"].Rows[0]["nom"].ToString(); string ext=""; //recup extension if (nomImg.LastIndexOf(".") != -1) { ext = nomImg.Substring(nomImg.LastIndexOf("."),(nomImg.Length)-(nomImg.LastIndexOf("."))); if ((ext==".jpg")||(ext==".jpeg")) { Response.ContentType = "image/jpeg"; new Bitmap(new System.IO.MemoryStream(mon_img)).Save(Response.OutputStream, ImageFormat.Jpeg); }![]()
![]()
Partager