REDIMENSIONNEMENT PROPORTIONNEL D'UNE IMAGE (PICTUREBOX)
cs_bidouille007
Messages postés257Date d'inscriptionjeudi 11 septembre 2008StatutMembreDernière intervention22 décembre 2012
-
30 avril 2011 à 12:39
Iragael
Messages postés6Date d'inscriptionsamedi 24 janvier 2004StatutMembreDernière intervention19 décembre 2013
-
19 déc. 2013 à 21:10
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
Iragael
Messages postés6Date d'inscriptionsamedi 24 janvier 2004StatutMembreDernière intervention19 décembre 2013 19 déc. 2013 à 21:10
Il y a beaucoup plus simple!!!
Format_Image_Source=Image_Source.Width/Image_Source.height
Format_PictureBox=Picturebox.Width/Picturebox.height
If Format_Image_Source>=Format_PictureBox Then
Echelle=Picturebox.Width/Image_Source.Width
Else
Echelle=Picturebox.height/Image_Source.height
End If
Image_Vignette = Image_Source.GetThumbnailImage(Image_Source.Width*Echelle,Image_Source.height*Echelle, Nothing, IntPtr.Zero)
Me.pictureBox.Image=Image_Vignette
à+
Merci quand-même! :-)
Clearness
Messages postés11Date d'inscriptionvendredi 29 avril 2011StatutMembreDernière intervention24 janvier 2012 1 mai 2011 à 00:30
@bidouille007 :
Effectivement, c'est une bonne idée à laquelle je n'avais pas pensé.
Je modifierais la source dans la semaine.
cs_bidouille007
Messages postés257Date d'inscriptionjeudi 11 septembre 2008StatutMembreDernière intervention22 décembre 20121 30 avril 2011 à 12:39
bonjour
je crois que tu aurais pu détecter par le chemin si l'image est sur le web ou en local.
Rien qu'en testant la présence ou pas au début du chemin si il y a ou non le fameux http
19 déc. 2013 à 21:10
Format_Image_Source=Image_Source.Width/Image_Source.height
Format_PictureBox=Picturebox.Width/Picturebox.height
If Format_Image_Source>=Format_PictureBox Then
Echelle=Picturebox.Width/Image_Source.Width
Else
Echelle=Picturebox.height/Image_Source.height
End If
Image_Vignette = Image_Source.GetThumbnailImage(Image_Source.Width*Echelle,Image_Source.height*Echelle, Nothing, IntPtr.Zero)
Me.pictureBox.Image=Image_Vignette
à+
Merci quand-même! :-)
1 mai 2011 à 00:30
Effectivement, c'est une bonne idée à laquelle je n'avais pas pensé.
Je modifierais la source dans la semaine.
30 avril 2011 à 12:39
je crois que tu aurais pu détecter par le chemin si l'image est sur le web ou en local.
Rien qu'en testant la présence ou pas au début du chemin si il y a ou non le fameux http