Saturday, August 28, 2010

[android-developers] Re: Crop an image

In the ImageView -> android:scaleType="centerCrop"

http://developer.android.com/reference/android/widget/ImageView.html#attr_android:scaleType

On Aug 16, 9:36 am, Nea <ehsan....@gmail.com> wrote:
> I have an imageview which has a photo taken with the camera as its
> background and a frame as it's foreground (src). In that way the photo
> is positioned behind the frame so the photo get's a nice border.
>
> The imageview is a square (265x265dip). Now the problem is that photos
> taken are rectangular and thuse they are squeezed into the imageview
> making them look akward.
>
> So how can I crop the bitmap of the photo so it is fitted as a square
> so I can then put it as a background for the imageview?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment