When loading a picture into byte[] in smartphone app sometimes ByteArrayOutputStream gives me nullpointerexception any explanation?
Bitmap bm = BitmapFactory.decodeFile(path);
System.out.println("BITMAP: "+bm != null);
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
bm.compress(CompressFormat.JPEG, 100, buffer);