Questions tagged [crop]

Crop refers to any issues relating to cropping images.

Cropping refers to the removal of the outer parts of an image to improve framing, accentuate subject matter or change aspect ratio.

Image example :

enter image description here

3129 questions
29
votes
3 answers

android:select image from gallery then crop that and show in an imageview

i really need this code and i searched for 3 hours on internet but i couldn't find a complete and simple code and i tested many codes but some didn't work and others wasn't good,please help me with a full and simple code,thank you edit:i have this…
user3648435
  • 471
  • 1
  • 4
  • 18
29
votes
5 answers

Center Crop an Android VideoView

I am looking for something like the CENTER_CROP in ImageView.ScaleType Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension…
clocksmith
  • 6,226
  • 3
  • 32
  • 45
28
votes
3 answers

how to change the UIImagePickerController crop frame

when opening working with an UIImagePickerController and setting allowsImageEditing = YES; there is a default cropping frame that is 320x320. In my case, I would like to setup that cropping frame to 320x240 for images that are landscape, and…
user123404
  • 281
  • 1
  • 3
  • 4
28
votes
4 answers

Crop for SpatialPolygonsDataFrame

I have two SpatialPolygonsDataFrame files: dat1, dat2 extent(dat1) class : Extent xmin : -180 xmax : 180 ymin : -90 ymax : 90 extent(dat2) class : Extent xmin : -120.0014 xmax :…
Jian Zhang
  • 1,173
  • 5
  • 15
  • 20
27
votes
1 answer

iOS - How to customize the crop rect in UIImagePickerController with allowsEditing on?

Is there any way to define the crop area rect using the camera image picker?
dan
  • 5,377
  • 13
  • 39
  • 44
26
votes
4 answers

Image Cropping API for iOS

Is there any cropping image API for objective C that crops images dynamically in Xcode project? Please provide some tricks or techniques how could I crop camera images in iPhone.
Appz Venture
  • 939
  • 1
  • 13
  • 28
25
votes
7 answers

Crop square image to circle - Programmatically

i was searching for past one day and i was not successful . i get the image from API , and i download it to a bitmap file using the following code . private Bitmap DownloadImage(String URL) { Bitmap bitmap = null; InputStream in…
VIGNESH
  • 2,023
  • 8
  • 31
  • 46
24
votes
4 answers

How can I crop an image with Pygame?

I am learning pygame and want a graphic for a button with the three states: normal, hover, and pressed. I have an image like this one ... ... and I want to get a new Surface using a portion of it. I'm loading the image with this code: buttonStates…
dobleseis
  • 629
  • 2
  • 7
  • 12
24
votes
6 answers

How can I easily crop a PDF page?

How can I easily crop a PDF page in a given PDF file? I prefer using as little coding as possible, and guess border geometries as little as possible...
Sparkler
  • 2,581
  • 1
  • 22
  • 41
24
votes
3 answers

Crop an image using multiple points and flexible size?

I want to make a an application like a cam scanner for cropping a document. But I need same functionality like my two images.. First Images shown image captured by camera.. Second image recognize a captured image part like this.. I research more…
Roadies
  • 3,309
  • 2
  • 30
  • 46
24
votes
7 answers

How to animate ImageView from center-crop to fill the screen and vice versa (facebook style)?

Background Facebook app has a nice transition animation between a small image on a post, and an enlarged mode of it that the user can also zoom to it. As I see it, the animation not only enlarges and moves the imageView according to its previous…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
21
votes
2 answers

How crop some region of image in Java?

I'm trying do the following code: private void crop(HttpServletRequest request, HttpServletResponse response){ int x = 100; int y = 100; int w = 3264; int h = 2448; String path = "D:images\\upload_final\\030311175258.jpg"; …
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
21
votes
4 answers

HTML - Bootstrap - How to crop the center part of an image

I'm creating a website and I want to crop an image to a square image based on the orientation of the image. I'm not really familiar with CSS so I'm not sure how to tackle this problem. If it's a landscape image (800x500) then I want the cropped…
FljpFl0p
  • 348
  • 1
  • 2
  • 10
20
votes
6 answers

.Net Core Image Manipulation (Crop & Resize) / File Handling

I have spent the last 5 hours trying to find a feasible way to accomplish what seems to me quite an easy task if it was a previous version of the .NET family that I was working with: Uploading a picture Resizing & Cropping the picture Saving the…
19
votes
3 answers

How to have similar mechanism of center-crop on ExoPlayer's PlayerView , but not on the center?

Background We record a video of the user's face, and usually the face is located at the upper half of the video. Later we wish to view the video, but the aspect ratio of the PlayerView might be different than the one of the video, so there needs to…
android developer
  • 114,585
  • 152
  • 739
  • 1,270