Android Question How to define the jpg quality with CameraEx class

clooney48

Active Member
Licensed User
Longtime User
Didn´t find out how to set the quality of the pics to maximum by code. Tried
B4X:
camEx.SetJpegQuality(180)
but the quality became less than more.
 

clooney48

Active Member
Licensed User
Longtime User
But even if I set width and height to very high values I get only 135 kB:
B4X:
Public Sub SetPictureSize(Width As Int, height As Int)
    r.target = parameters
    r.RunMethod3("setPictureSize", "300000", "java.lang.int", "400000", "java.lang.int")
End Sub
 
Upvote 0

clooney48

Active Member
Licensed User
Longtime User
You shouldn't change SetPictureSize code. You should pass the values instead.

You cannot set an arbitrary size. You should find the supported sizes with GetSupportedPictureSizes.
Hi Erel!

Sorry, but after hours I didn´t find out where to define width and height to get the max. size. I won´t to do it with btnPictureSize but automatically when I click on btnTakePicture. The correct dimensions I get from the first data set of GetSupportedPicturesSizes as far as I realized.
 
Upvote 0
Top