Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/06/2016, 18:22
CiudadDragon
 
Fecha de Ingreso: junio-2016
Mensajes: 1
Antigüedad: 7 años, 10 meses
Puntos: 0
conversión de imagen a binario

en esta foto esta el problema

http://oi66.tinypic.com/5k59mu.jpg

HOLA CHICOS TENGO UN PROBLE MITA ES QUE ESTOY CONVIRTIENDO UNA IMAGEN A BYTE Y LA CONVERSION ME LO HACE NITIDA PERO CUANDO VEO LA IMAGEN EN LA BASE DE DATOS O EN EL FORMILARIO ESTA CORTADA
ME DAN UNA AYUDA

ESTOS SON LOS CODIGO

SOLO LES PUSE LOS DEL PICTURE Y LOS DEL BOTON QUE ME HACE LA CONVERSCION
Private Sub FOTOPictureBox_Click_2(sender As Object, e As EventArgs) Handles FOTOPictureBox.Click
If OpenFileDialog1.ShowDialog(Me) = DialogResult.OK Then

'Get the image name

Dim img As String = OpenFileDialog1.FileName



'Create a new Bitmap and display it

FOTOPictureBox.Image = System.Drawing.Bitmap.FromFile(img)

End If

End Sub

Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
Dim ms = New MemoryStream()
FOTOPictureBox.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg) ' Use appropriate format here
bytes = ms.ToArray()
End Sub

Última edición por CiudadDragon; 19/06/2016 a las 19:50