0
我想将图片文件添加到解析对象中,并且我需要关于它的帮助。将图片视图保存为图片视图以解析Android中的对象
我尝试下面的代码,但在“的getBytes()”的一部分,我得到了错误“无法解析的方法。我怎样才能解决这个问题?
非常感谢你。
profileImage = (ImageView) findViewById(R.id.signup_activity_imgView);
profileImage.setDrawingCacheEnabled(true);
profileImage.buildDrawingCache();
Bitmap bm = profileImage.getDrawingCache();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, 100, stream);
byte[] byteArray = stream.toByteArray();
byte[] data = byteArray.getBytes();
ParseFile image1 = new ParseFile("profilePhoto.jpg", data);
userSettingObj.put("photo", image1);
你好Shadab,我该如何保存图像文件解析? – saner
你为什么不改变这一行ParseFile image1 = new ParseFile(“profilePhoto.jpg”,data);到ParseFile image1 =新的ParseFile(“profilePhoto.jpg”,byteArray); ? –