Hi
I am trying to save picture taken by the camera, it works properly. But when I try to attach the saved images to mail or upload to facebook it shows that the width and height as zero and there by it gives upload error. And also image is not displayed in the gallery of the phone. My code is here
and also I use this code for sharing
Any help please.......
I am trying to save picture taken by the camera, it works properly. But when I try to attach the saved images to mail or upload to facebook it shows that the width and height as zero and there by it gives upload error. And also image is not displayed in the gallery of the phone. My code is here
HTML:
Sub camera1_PictureTaken (data() As Byte)
Dim out As OutputStream
Dim photofile, savefile As String
photofile=DateTime.Now &".jpg"
Readvalues
'photofile = "GC" & NumberFormat2(photonum+1,5,0,0,False)& ".jpg"
out = File.OpenOutput(filedire, photofile,False)
out.WriteBytes(data, 0, data.Length)
out.Close
camera1.StartPreview
Try
exif.Initialize(filedire, photofile)
exif.setAttribute(exif.TAG_GPS_LATITUDE,ctostring(lat))
exif.setAttribute(exif.TAG_GPS_LONGITUDE,ctostring(lon))
exif.setAttribute(exif.TAG_GPS_ALTITUDE, altd)
exif.saveAttributes
Catch
End Try
image_last.Visible=True
image_last.Bitmap=LoadBitmapSample(filedire,photofile,image_last.Width,image_last.Height)
album_scroll.AddTwoLinesAndBitmap("","",LoadBitmapSample(filedire,photofile,100dip,80dip))
photolist=File.ListFiles(filedire)
Label_smallcount.Text=photolist.Size
ToastMessageShow("Image saved: " & File.Combine(filedire, photofile), True)
loadimages(photolist)
'photonum=photonum+1
'map1.Put("photonum",photonum)
'File.WriteMap(File.DirInternal, "MyProg.ini", map1)
'End If
End Sub
and also I use this code for sharing
HTML:
If Position=1 Then
myshare.sharebinary("file:/" & filedire &"/" & label_file.Text ,"image/jpg","Share this Photo")
Return
End If
Any help please.......
Last edited: