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
13
votes
1 answer

How to get variable width & height when cropping with Jcrop and save with PHP GD

I have an application that has to crop images with variable width & height. but i don't know how to do this with the php gd (Createimagefromjpeg) function in my code i have: $targ_w = 400; $targ_h = 400; This means that the cropped image will…
Kees Sonnema
  • 5,759
  • 6
  • 51
  • 106
12
votes
3 answers

How to Locate Alignment Marks in an Image

I am designing a system that will scan in standardized forms to images (e.g., TBitmap). I would like to identify alignment marks on these pages and use the locations of these crop marks to rotate the page to its proper orientation (so top is…
Greg Bishop
  • 517
  • 1
  • 5
  • 16
12
votes
2 answers

Android Camera - How can i take a specific "rectangle" from the byte array?

I have created an application that shoots and saves photos. I have a preview and an overlay on top of that preview. The overlay defines a square (the area around the square shows the preview a bit darker), as you can see in the image: example What i…
Eyal
  • 1,748
  • 2
  • 17
  • 31
12
votes
10 answers

iPhone programmatically crop a square image to appear as circle

I'm trying to create an image for a custom style UIButton using an image from the camera roll on iPhone. The button has a circular background and effectively appears as a circle. Now I need an image to go in the middle of the button that also…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
12
votes
1 answer

How do I get the top region of an image when cropping with Rails and Paperclip?

So I have a Rails 3 app using Paperclip to crop images. I have this code in my model for Photo: has_attached_file :thumbnail, PAPERCLIP_OPTIONS.merge( :styles => {:cropped => '300x250#'}) The resulting image that's generated creates a 300x250…
Ben Scheib
  • 392
  • 1
  • 3
  • 16
12
votes
3 answers

Crop/Adjust image in heart shape/frame

I am trying to crop or adjust image as per heart shape. User can adjust image as per heart shape and set image to that heart shape. Currently, I am using Android Image Cropper library to crop the image as a square and to set to heart shape. But all…
Sandip Armal Patil
  • 6,241
  • 21
  • 93
  • 160
12
votes
4 answers

How to crop the parsed image in android?

I am parsing a website to display the contents in a URL, in that some images are there. I want to crop the images which are parsed from the site. I'm really struggling on this, can any one help me regarding on this?
Sankar Ganesh PMP
  • 11,927
  • 11
  • 57
  • 90
12
votes
2 answers

Android, can't upload images using WebView

I'm looking for a solution for some days for my problem but I can't find a good one. So I wanted to ask here again before I start developing a native app for Android since I can't solve this problem. As the title says, I'm trying to upload an image…
yadbo
  • 407
  • 1
  • 5
  • 16
12
votes
4 answers

How to take screenshot of certain part of screen in Pygame

Is there a way I can take a screenshot of the right half of my pygame window? I'm making a game using pygame and I need to take a snapshot of the screen but not the whole screen, just the right half. I know…
Serial
  • 7,925
  • 13
  • 52
  • 71
12
votes
1 answer

How to Get Correct Path After Cropping the Image?

I want to Crop the Capture/Selected Image and Upload it on to server. What Problem I am Facing : After Cropping the Image i am not getting actual path for that Cropped Image. i have done my code below way. i am croping the image correctly also…
Bhavesh Patadiya
  • 25,740
  • 15
  • 81
  • 107
12
votes
3 answers

Cropping UIImage like camscanner

I am stuck in my application feature. I want cropping feature similar to Cam Scanner Cropping. The screens of CAM-SCANNER are: I have created similar crop view. I have obtained CGPoint of four corners. But How can I obtained cropped image in…
12
votes
3 answers

How to remove square ratio cropping for images on IOS

I am using the IOS standard image cropping functionality (move and scale) to crop my image before submitting it to the server. However, I realize that the cropping provided has a square ratio (see screenshot below) Snippet of the code is as…
Zhen
  • 12,361
  • 38
  • 122
  • 199
11
votes
4 answers

Cropping videos in iOS

We can crop images. Can we crop videos?
Anand
  • 2,086
  • 2
  • 26
  • 44
11
votes
4 answers

How to crop image rectangle in camera preview on CameraX

I have a custom camera app which has a centered rectangle view, as you can see below: When I take a picture I want to ignore everything outside the rectangle. And this is my XML layout:
R Rifa Fauzi Komara
  • 1,915
  • 6
  • 27
  • 54
11
votes
1 answer

Swift: Crop and Export Video

I want to crop a video to square, but i couldn't do that. I converted this code to swift but i only get black screen after exporting the video var videoComposition: AVMutableVideoComposition = AVMutableVideoComposition() …
user3786081
  • 177
  • 2
  • 13