B4A Library [Class] CameraEx - Extends the camera library functionality

Status
Not open for further replies.

padvou

Active Member
Licensed User
Longtime User
Please try to start new threads for new questions. This thread is quite mixed...

@MotoMusher, try to add a short delay in FocusDone event. You can use CallSubDelayed to call TakePicture.

@padvoud why do you need to call CloseNow?

I tried it as a workaround for the app freezing.
If you would please take a look at the log I attached, this is my main issue for resolving.
 

ivanomonti

Expert
Licensed User
Longtime User
How do I add custom filters as well as frames in this class!!

In addition, it is possible to enter GPS data

Thank
 

birnesoft

Active Member
Licensed User
Longtime User
how can I setPreviewSize( width, height) from camera

I've listed the possible sizes with this code


pl is:

(ArrayList) [android.hardware.Camera$Size@57dac0, android.hardware.Camera$Size@9fbc30, android.hardware.Camera$Size@afb580, android.hardware.Camera$Size@13f7860, android.hardware.Camera$Size@1676730, android.hardware.Camera$Size@1a74bb0, android.hardware.Camera$Size@27eefd0]

that means:

176-144
320-240
352-288
640-480
720-480
848-480
1280-720

and now I want to set the best size

Java: public void setPreviewSize (int width, int height)

setPreviewSize (1280,720 )

How can I do this??:sign0163:

thank Björn
 

birnesoft

Active Member
Licensed User
Longtime User
when I change the previewSize the function PreviewImageToJpeg

don't work anymore (program crash and bad picture) ???


r.target = parameters
r.RunMethod3("setPreviewSize", 1280, "java.lang.int", 720, "java.lang.int")

and

Sub Camera1_Preview (PreviewPic() As Byte)
Dim jpeg() As Byte = PreviewImageToJpeg(PreviewPic, 80)
 

birnesoft

Active Member
Licensed User
Longtime User
adb Logcat program crash after calling PreviewImageToJpeg(PreviewPic, 80)


so much crazy stuff ... I don't understand. :sign0013:

Björn
 

birnesoft

Active Member
Licensed User
Longtime User
find no limits in B4A

Juhu,:sign0060:...Erel you are unbelievable, it works.

I've not make commitParameters

U are the best. Another La Ola wave 4U :wav:

Thanks 1000 times

I find no limits in B4A
 

yckhor

Member
Licensed User
Longtime User
Hi Erel,
I am attaching 2 screen capture of my app. The camera ex works beautifully but the only issue I am facing is that the captured image seems off proportion in landscape and portrait mode (activity with no title bar & full screen).

I had tested this on the sample camera app provided with this library and produced similar results. This, however, does not happen in the android stock standard camera app.

FYI, I am using a HTC Desire HD rooted and running Android 4.2.2.

Any help would be appreciated. Thanks!
 

Attachments

  • Screenshot_2013-06-25-19-28-14.jpg
    9.4 KB · Views: 221
  • Screenshot_2013-06-25-19-27-53.jpg
    8.2 KB · Views: 216
Last edited:

yckhor

Member
Licensed User
Longtime User
Hi Erel,
The picture size is not an issue, yes, I tried. I had attached the 2 pictures took in landscape & portrait orientation and both looks proportionally correct (notice the little girl figure with a hula loop). It is the preview in panel before a photo is being snapped that looks out of proportion. If you look at the snapshots in my earlier post, you can see the 2 screen snapshot (with a round shutter button) that did not look right in portrait mode, everything looks longish.. am I missing something? Title bar is hidden and it is in Full Screen.:sign0085:

EDIT: Now I realize why you asked me to check SetPictureSize. It's my mistake not illustrating clearly. It's the preview image that's out of proportion not the captured image.
 

Attachments

  • 1.jpg
    14.5 KB · Views: 220
  • 2.jpg
    15.6 KB · Views: 211
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…