Hi guys can anybody help me...
I have trying to get image from galery using intent
and the result i put in 2 imageview using
in one activity which is one imageview created using designer and the other created on the fly using imgView.Initialize("imgView").
The Question is, why the result are different?
- imageview from designer is croped perfectly
- imageview from initialize is croped badly
My Project have to use imageview from initialize....
I have trying to get image from galery using intent
B4X:
Sub imgView_Click
Dim i As Intent, Directory As String, PictureName As String
Directory = File.DirDefaultExternal 'File.DirRootExternal
PictureName = "radtemp.jpg"
i.Initialize(i.ACTION_PICK, "")
i.SetType("image/*")
i.PutExtra("output", ParseUri("file://" & File.Combine(Directory, PictureName))) 'output folder you set OpenCam(File.DirRootExternal, "1.jpg")
i.PutExtra("crop", "true") 'crop ON
i.PutExtra("aspectX", 1) 'crop aspects
i.PutExtra("aspectY", 1) 'crop aspects
i.PutExtra("outputX", 256) 'crop size
i.PutExtra("outputY", 256) 'crop size
StartActivity(i)
End Sub
and the result i put in 2 imageview using
B4X:
imgView.Bitmap = LoadBitmapSample(File.DirDefaultExternal, "radtemp.jpg",100%x, 100%y)
in one activity which is one imageview created using designer and the other created on the fly using imgView.Initialize("imgView").
The Question is, why the result are different?
- imageview from designer is croped perfectly
- imageview from initialize is croped badly
My Project have to use imageview from initialize....