Overlaying, resizing and repositioning an image - android

Hey there I am developing an android app to add filters i am first getting the images from gallery and camera the i am overlaying another image in same image view but the problem is this that the image i overlayed is of fixed size. I want to resize and reposition it during run time. Watch this video for reference
https://youtu.be/kGbvO--RDwU
I just need your suggestions. I have overlayed the image perfectly. Now i just need to resize, repostion or rotate that image on run time

Related

How to scale up the image but prevent from cropping in ImageView?

I want to create an application of MEC Wheel in which there are two wheels(Images). Background image rotates through finger gesture, while foreground remains static. Also, I want that background image which is rotatable to be scale up. I have achieved it as well but when I rotate the image, it shown as crop. I am attaching the images as well.
I have resolved the issue by scaling it through code in onCreate() method.
imgMECWheel.setScaleX(mScaleFactorBackground);
imgMECWheel.setScaleY(mScaleFactorBackground);

Next steps after succesfully taking image / selecting from gallery

I succesfully made this simple app of where you can either choose and image from gallery or take a picture: Pick Image From Gallery Or Camera In Android Studio Programmatically. But for my purpose, where the selected image needs to serve as a profile image, I want the image to be square.
Also, some photos that are selected from gallery are rotated (Not to mention they are rectangled)
Where do I go from here in order to make user crop and rotate the image before uploading it? I want the final result to be a square image with the correct rotation.
In terms of cropping the image, there are many image cropping libraries for Android for you to choose from.
It is possible that one of those will also allow the user to rotate the image. If not, you will need to handle that yourself.
If you only need to allow the user to rotate the image a few ways (e.g., portrait and landscape), you could use a Switch or Spinner to allow the user to choose a rotation, then rotate the ImageView to show them what it looks like. Once they choose a rotation to use, you can use a Matrix to rotate the Bitmap. Ideally, you would rotate the image after cropping, as photos are large and you may run out of memory trying to rotate a photo.

Capture particular area image and remove unwanted space using camera in android application

I want to Capture particular area image and remove unwanted space using camera in android application. and then this image set to imageview
I want to capture only inside
that white rectangle image.

Overlapping Overlay Image with Image Taken from camera

I am doing a project where I need to OverLay few custom images, where option to add faces taken from camera will be given. Considering the following image
I will take faces from camera and I want to fit in the face into this overlay.
I have used following layout structure
FrameLayout
SurfaceView // For Displaying custom Camera
ImageView // For Displaying The overlay image as below
FrameLayout
I have zoom option for the ImageView as well which will make the image to fit in the Faces taken from camera
Now I am stuck in following 2 problems:
When I click on take picture, I am trying to get the drawing cache
of the Framelayout, But I am getting a black image for the
surfaceview view
Since I have ImageView to be zoomed as well, I am not able to
stitch back overlay to fit the face taken

How to Drop image over image view using fingure touch

I am very much new this issue.I want to make application like this.look at the image below,This is a brief summary of my requirement.
ok so top there is a image view.After user capture image from camera in OnActivityResult I am displaying captured image on main image view. Below that image view there is a HorzontalScrollView, Inside HorzontalScrollView i have put couple of images,like hat,spects etc...
ok so What i want is, user should be able to drag any image from HorzontalScrollView and can be able to put that small image on main image view.
Any guide/tutorial will be appreciated from guys who have worked on such functionality
Thanks

Categories

Resources