[FREE] PhotoPlus is a camera for shooting with an overlay of your components

This is my next extension, the purpose of which is to take a photo with any representation of the layout superimposed on it. With this application, only fantasy can limit its photo creation applications.
Here is a usage example that provides insights, but not all the possibilities. For example, you can capture coordinates on a photo or create a drawing on a photo. Here are some examples of photo overlays.
viewfinder example and sample photo: :

when creating the extension, I tried to take into account the compactness of use, without piling up incomprehensible blocks.

edit
brief annotations are written in all blocks
how to use:
Start
this is the first traditional feature :slight_smile:
here you can specify the component on which your overlay view layout is located. that is, I made it simpler and clearer. it is not necessary to add overlay components later, but on the contrary, we add the camera background to the component. and do not forget that if you set the background color in the specified layout, the camera will not be visible. so the background must be colorless to see the camera broadcast.

ready
as soon as the camera is initialized (also when you turn it over, change cameras) this will be reflected in the CameraReady event.

getsupport
this function outputs a string of all supported photo sizes in the camera in the format width x height(4000x3000,…) the quality of the photo and its size depend on it. the list can be quite a long one. it should be understood that the front and rear cameras can and will have a different set, including the maximum resolution, so when changing the camera, this should be taken into account.

qul
sets the image quality in the photo.takes an integer value up to 100

setSize
in this block, you can set the size of the photo by the index. you don’t have to install it, then the camera will be saved in the default size.
getcurrent
returns the photo resolution
switch
switch between the front and rear camera. important! The camera does not start if it cannot support the specified resolution.
flash
flash control. Attention! If the front camera is working, the flash will not work. these are the features of the flash. it depends on the camera. In total, the flash will be monitored if the back camera is turned on
orient
indicates how the camera is oriented now. horizontally or vertically (Portrait or Landscape)
mirror
only for the front camera. this function will make the final photo mirrored upside down (will lead to the correct view). I noticed that all the cameras I’ve seen save photos as they see them, but in reality you can flip the image.

TakeFoto
save the photo to the specified directory and the file name of the specified prefix with the date and time in the file name. by default, this is the DCIM/PhotoPlus directory. the default file prefix is PhotoPlus_. you can change it as you wish.the final format will look something like this: “/storage/emulated/0/DCIM/PhotoPlus/PhotoPlus_20240718_100121.jpg”
The photo will be immediately available in the Gallery!
The overlays themselves may differ slightly in size in the preview and the finished photo due to the peculiarities of scaling. I have been working on the problem of scale and made adjustments, but it is very difficult to achieve a perfect match keep this in mind and don’t throw slippers at me for it :slight_smile:
event_take
after saving the photo, this event is triggered indicating the path to the file. it is the actual path , and not the URL of the content link, which is convenient in further application.

open
the list of photos opens via the available applications. (for example, a Gallery or a Google photo)
event error
the event occurs in cases of an error

for the extension to work, you need to declare two standard and harmless permissions: -------android.permission.CAMERA
android.permission.WRITE_EXTERNAL_STORAGE (for Android 10 and below (SDK 29))
(annotations are already included in the extension, you only need to request them)

Download:
testapk:PhotoPlus.apk (4.6 MB)
aix: I will post after 20 likes :slight_smile:
aia: oh, look at the same conditions as aix

the condition is fulfilled :slight_smile:

PhotoPlus_v1.aix (19.7 KB)

TEST96_PhotoPlus.aia (134.4 KB)

23 Likes

Awesome work. Waiting when it reaches required likes so I can test.

Cool, keep on @11119 :heart:

Hello, looking forward to aix publication!

1 Like

the condition is fulfilled. The extension is published

And also. you do not need to set the background component as an image. otherwise, it will overlap the image received from the camera. this is quite convenient if you want, for example, to apply a mask to a photo (i.e., cover part of the image with another image on top of the photo. ) here only your imagination limits the use of this extension :slight_smile:

@11119
Great extension for camera viewer :selfie::camera_flash::smiling_face_with_three_hearts:
And clear view with customisable.

1 Like

Nice job!
congratulations!
Question:
how do i do to set the capture picture size directly?
I only need 640x480 picture size.
The component SetPictureSize needs an index value.
I don’t have idea how to put in work.
any ideas?

Very very thanks !
David

Problem solved.

Using the actions of the same extension, I obtained the list of acceptable image sizes, with 1 being the highest acceptable value, and the last on the list, 320x240.

After knowing the number of acceptable formats, calculate that total amount minus 1, to obtain the second to last one on the list

(last = 320x240, last - 1 = 640x480)

The rest was simple.

1 Like

Yes. your actions were correct. there is no way to predict what permissions a particular smartphone model has. therefore, it is necessary to pre-request possible camera resolutions and then use the method of assigning an index from a ready-made list. In addition, the list of front and rear cameras may not match.

Good job
does it take into account android > 10 ?

It works on 12 without any problems.