Thanks for the responses, I was able to resolve the issue. On Jan 2, 3:21 am, Mukesh Srivastav <[email protected]> wrote: > Hi Mates, > > I have done a Image cropping applicaton and below is the flow i had used it. > > App Launch- Goes to -- > Camera---> Takes Pictures--->Goes to Gallery---> > Select Image---> Goes to Cropped Intent---> FTP Module. > > In order to cropped the image, please find the below link. > > http://www.walletapp.net/crop-image > > Cheers :) > > -- > Warm Regards, > *Mukesh Kumar*, > Android Consultant/Freelancer, > India,Hyderabad. > > > > > > > > On Sun, Jan 1, 2012 at 3:22 PM, xuanon <[email protected]> wrote: > > This is the code I´m using for an app and it is working fine: > > > public void onImageClick(View view){ > > Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); > > photoPickerIntent.setType("image/*"); > > startActivityForResult(photoPickerIntent, 1); > > } > > > @Override > > public void onActivityResult(int requestCode, int resultCode, Intent > > data) { > > super.onActivityResult(requestCode, resultCode, data); > > if (requestCode == 1) > > if (resultCode == Activity.RESULT_OK) { > > Uri selectedImage = data.getData(); > > img.setImageURI(selectedImage); > > } > > > on the layout: > > <ImageView android:id ="@+id/pictureViewer2" > > android:contentDescription="@string/imagen" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:clickable="true" > > android:onClick="onImageClick" > > android:adjustViewBounds="true" > > android:scaleType ="fitCenter" > > /> > > > To avoid cropping the important thing is the scaleType and > > adjustViewBounds tags. > > > Hope this helps. > > > On 31 dic 2011, 20:12, "mr.winky" <[email protected]> wrote: > > > I am writing an intent to allow the user to pull an image from the > > > gallery: > > > > Intent getImage = new Intent(Intent.ACTION_GET_CONTENT); > > > > getImage.setType("image/*"); > > > getImage.putExtra("outputX", width); > > > getImage.putExtra("outputY", height); > > > getImage.putExtra("aspectX", width); > > > getImage.putExtra("aspectY", height); > > > getImage.putExtra("noFaceDetection", true); > > > getImage.putExtra("scale", true); > > > getImage.putExtra("crop", "true"); > > > getImage.putExtra("setWallpaper", false); > > > > startActivityForResult(Intent.createChooser(getImage, "Select > > > Background Image"), 0x10); > > > > Everything is working fine and a new image is generated from the > > > gallery except it looks like the image that comes back cropped is in a > > > lower quality format from the original image, like 16 bit color format > > > instead of 32 bit. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

