Προσαρμογή εικόνας στο PictureBox

Private Sub SetPicture(ByVal imgSrc As Bitmap, ByVal target As PictureBox) Dim imgDest As Bitmap = New Bitmap(target.ClientSize.Width, target.ClientSize.Height) Dim source_aspect, dest_aspect, k_aspect, K As Double source_aspect = imgSrc.Width / imgSrc.Height dest_aspect = imgDest.Width / imgSrc.Height k_aspect = dest_aspect / source_aspect If (k_aspect > 1) Then K = imgSrc.Height / imgDest.Height Else K = imgSrc.Width /…

Διαβάστε το άρθρο

About DigiSpot