I have to save a crop image (I used to crop the functionality of android ) in a folder data/data/myapp/files/ !!
I looked up how to do, but can not figure out the right way!
Can anyone tell me where to see, or how?
Thank you!!
Related
in my app I capture a photo using intent MediaStore.ACTION_IMAGE_CAPTURE and I save image into external storage that is private to my app. I also save the path to taken picture.
In next step I would like to crop 3 pictures from this photo but I cannot figure out how to do it. I found this article Crop an Image by passing the image file path in Android but the answer uses com.android.camera.action.CROP, which is often not supported. I would like to crop it like this
Bitmap bmp=BitmapFactory.decodeResource(getResources(), R.drawable.xyz);
resizedbitmap1=Bitmap.createBitmap(bmp, 0,0,yourwidth, yourheight);
but I need to crop picture according to user selection. Can anyone help me with this? I am pretty stuck here.
So I ended up using some third party library for cropping pictures. I recommend you to do the same. You will find plenty of them on github, choose according to your preferences.
i am doing an android app that launches camera and capture an image, then crop and save the image. Then takes the image for some process.
i was trying with some suggestions and tutorials by searching on Google. but i am getting error after cropping. The image is being cropped and actual image remains in SD-Card also the cropped image saved as "image~2" in same location. but while we try to use the cropped image filenotfoundException is returned. Any one please help me.
"can i post my code?" - You should, actually, if you want some help here... Anyway considering the exception, you're searching for the image where it is not.
Or you can try this: https://github.com/edmodo/cropper
Sorry Guys for all the vague questions. this is what i want to do. I want my app to randomly play images from SdCard and I want no user input after app is started. I have read lot of sdcard post but this is not same question. if this is possible please let me know how i go about this. I do not want any user input once the app is started it just plays images from sdcard. Thank you for your help. by the way i am trying to implement this using android.
To show a slide show of images from your sdcard have a look at http://codinglookseasy.blogspot.in/2012/08/image-slide-show.html. Hope this helps you.
Get the image paths into the sdcard and pass it to the gallery.
You can follow this link for few more information http://raivoratsep.com/114/android-gallery-tutorial-working-example/
suppose you get the path name as
String pathName = "/sdcard/images/abc.jpg";
You can set the image to the image view as
Drawable d = Drawable.createFromPath(pathName);
hope this may help you
try creating another layout-land folder with the same xml file as in the layout folder.
This will be used as the layout when the mobile is in the landscape mode.
And to prevent crashing try to use
System.gc();
in the ondestroy()
And i didnt find any difficulty by adding new images.
They work fine for me.
I need to crop a picture. What I want to do is crop it by zooming the picture and then saving whatever is visible on the screen. Can anyone help me?
I recommend Image Crop library.
https://github.com/naver/android-imagecropview
please try this :)
I had create on gallery its display image but i am expecting to display folder images
Example: 1. camara image folder 2. all images 3.sdcard images.....this type if its possible how to create please help me....
This is your answer
(Environment.getExternalStorageDirectory(),"/Imagesfoldername/")