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
19
votes
5 answers

How to select a portion of an image, crop, and save it using Swift?

I am trying to create an iOS app using Swift to capture images and let the user save a selected portion of the image. In many cam based apps, I noticed that a rectangular frame is offered to let the users choose the desired portion. This involves…
Sriram
  • 999
  • 2
  • 12
  • 29
19
votes
3 answers

Upload and crop image before sending it to the server

Is there some client components (jquery/swf) that will give the possibility to upload and crop (user should be able to select the area to crop) an image in the browser and then send the cropped image to the server? I'm on asp.net-mvc (not sure if it…
Omu
  • 69,856
  • 92
  • 277
  • 407
19
votes
3 answers

Custom Android Image Crop

i just want to share this piece of code that i wrote. I tried searching for a custom crop activity, but most of them leads to the default "com.android.camera.action.CROP" despite the question custom crop, or freehand crop activity. Anyway, i just…
Seph Remotigue
  • 427
  • 1
  • 3
  • 9
18
votes
1 answer

AdornerLayer goes outside Border if I zoom the picture WPF

I created the logic that crops an image that is contained inside a border that is inside a grid. The grid has many borders, so this grid will have many pictures. The problem is that when I zoom the picture the logic zoomed the picture (which is…
avmauricio
  • 1,008
  • 1
  • 7
  • 19
17
votes
3 answers

Image resize with Crop

I want to create a function that after an image upload, will allow a user to resize an image. But the image must be behind a crop frame and the user must be able to drag/move/resize the image behind the crop frame. Here is a screenshot of what I am…
Clinton Green
  • 9,697
  • 21
  • 68
  • 103
17
votes
4 answers

Using cropper.js before Dropzone.js send image to server

What I want to do here is before Dropzone.js send the dropped image to the server, a modal appears with cropper.js (fengyuanchen script) so the user can crop the image, and when image is cropped, send it with Dropzone.js to the server. So when i…
Fosfor
  • 331
  • 2
  • 3
  • 15
17
votes
3 answers

how do i use imagick in php? (resize & crop)

I use imagick for thumbnail crop, but sometimes cropped thumbnails are missing top part of the images (hair, eyes). I was thinking to resize the image then crop it. Also, I need to keep the image size ratio. Below is the php script I use for…
newworroo
  • 399
  • 2
  • 3
  • 9
16
votes
2 answers

Crop a fixed size image in Android

I am trying to crop an image but I want to be able to set the cropped area to exactly 640px x 640px. I want to prevent a user from cropping down to a really small area. So basically I would prefer to have a fixed height and width for the cropping…
Etienne Lawlor
  • 6,817
  • 18
  • 77
  • 89
16
votes
1 answer

Crop Image with face detection in android

I needed a demo where any image can be cropped with the face detection function. FIXED But after few surfing hours I didn't come to a single demo, so I prepared a single demo with conjunction of few demos that I found online. I have prepared a demo…
Priyank Joshi
  • 300
  • 1
  • 4
  • 17
16
votes
6 answers

Cropping image in PHP

I'd like crop an image in PHP and save the file. I know your supposed to use the GD library but i'm not sure how. Any ideas? Thanks
user244228
  • 243
  • 2
  • 3
  • 7
15
votes
2 answers

How to implement freehand image cropping in android?

How can i implement freehand cropping on Imageview. Using below code i'm able to draw freehand path and can able to crop image but i'm facing some other problems Now what i have tried so far Here is my code code for cropping image using…
Goku
  • 9,102
  • 8
  • 50
  • 81
15
votes
1 answer

Problems with cropping a UIImage in Swift

I'm writing an app that takes an image and crops out everything except for a rectangle in the center of the image. (SWIFT) I can't get the crop function to work though. This is what I have now: func cropImageToBars(image: UIImage) -> UIImage { …
mawnch
  • 385
  • 2
  • 4
  • 13
15
votes
3 answers

Angular JS Image Crop Directive

Can anyone recommend a decent image cropper directive for Angularjs? I've looked at a few out there and can't find much of anything. Has anyone found one they use that they like? We currently use angular-file-upload…
nweg
  • 2,825
  • 3
  • 22
  • 30
15
votes
2 answers

Android crop image like camscanner

I am developing a project which requires the image crop feature like camscanner android application,when a picture is taken and when user clicks the crop button, a rectangle overlay should be shown as in camscanner. Where the rectangle path can be…
Robin prash
  • 153
  • 1
  • 1
  • 6
15
votes
2 answers

iOS Custom UIImagePickerController Camera Crop to Square

I'm trying to create a camera like Instagram where the user can see a box and the image would crop to that box. For Some reason the camera doesn't go all the way to the bottom of the screen and cuts off near the end. I'm also wondering how would I…