Android Question Photo Library with the best results for specified dimensions?

JOTHA

Well-Known Member
Licensed User
Longtime User
Hello community,

with which photo library will I get the best results?
1) When taking photos, a frame with specified dimensions should appear.
2) Create photos with specified dimensions (e.g. credit card format, passport format, square format or signature field with the dimensions 300x75).
3) Compress the photos to a small file size (they are only needed on the smartphone).
4) Save in this format without rotating the photo.

Thank you in advance for your recommendations.
 

JOTHA

Well-Known Member
Licensed User
Longtime User
Hello Erel,

thank you for your good advice.

I already used IntentCamera, but I don't have as many options as with the CamEx Library,
so I've already done a lot of experiments, but haven't found a solution.

I would like to photograph a special format (on the display like through a window ... or passepartout),
but in the CamEx Library I only have predefined "supported preview-sizes" ...
Supported Preview-Size: 1920 x 1080
Supported Preview-Size: 1440 x 1080
Supported Preview-Size: 1080 x 1080
Supported Preview-Size: 1440 x 720
Supported Preview-Size: 1280 x 720
Supported Preview-Size: 960 x 720
Supported Preview-Size: 720 x 480
Supported Preview-Size: 640 x 480
Supported Preview-Size: 352 x 288
Supported Preview-Size: 320 x 240
Supported Preview-Size: 176 x 144

... and a lot of "supported pictures-sizes":
Supported Pictures-Size: 4624 x 3472
Supported Pictures-Size: 4624 x 2600
Supported Pictures-Size: 4624 x 2136
Supported Pictures-Size: 3840 x 2160
Supported Pictures-Size: 3472 x 3472
Supported Pictures-Size: 2560 x 1920
Supported Pictures-Size: 1920 x 1440
Supported Pictures-Size: 2340 x 1080
Supported Pictures-Size: 1920 x 1080
Supported Pictures-Size: 1440 x 1080
Supported Pictures-Size: 1080 x 1080
Supported Pictures-Size: 1440 x 720
Supported Pictures-Size: 1280 x 720
Supported Pictures-Size: 960 x 720
Supported Pictures-Size: 720 x 480
Supported Pictures-Size: 640 x 480
Supported Pictures-Size: 352 x 288
Supported Pictures-Size: 320 x 240
Supported Pictures-Size: 176 x 144

For example, if I want to photograph a barcode, only the format of the barcode (300 x 75) should appear in the window and only this format should be saved as an image.

I tried that with this code:
B4X:
    camEx.SetPictureSize(300, 75)
    camEx.SetPreviewSize(300, 75)
... but the photo always has the resolution 3472 x 4640px.

How can I set special dimensions in advance with CamEx? ... or is that not possible with this library?

The user should only take a photo and not have to edit the picture afterwards ...
 
Last edited:
Upvote 0

JOTHA

Well-Known Member
Licensed User
Longtime User
Thank you Erel for your hint.
So I'll take the photo first and then edit the picture afterwards.
 
Upvote 0
Top