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