title: How to reduce size of jpeg image in basic4android
body: <p>Hello at this time camera capturing image size is more than 1 mb. I want to reduce it to 20kb. Please help me.</p>
  
  <pre><code>Sub Camera1_PictureTaken (Data() As Byte)
      camera1.StartPreview
      DateTime.DateFormat ="HH.mm.ss.SS_dd-MM-yy_"
      forDate=DateTime.Date(DateTime.now)
      imei = pID.GetDeviceId
  
      filename = forDate &amp; imei&amp; "_.jpeg"
      File.MakeDir(File.DirRootExternal,"/data/data/a3a/cam/update/images")
      out = File.OpenOutput(File.DirRootExternal,"/data/data/a3a/cam/update/images/"&amp;filename, False)
      out.WriteBytes(Data, 0, Data.Length)
      out.Close
  End Sub
  </code></pre>