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

Crop Canvas / Export html5 canvas with certain width and height

There are hundreds of tutorials, how one can crop an image by drawImage() on a canvas. context.drawImage(imageObj, sourceX, sourceY, sourceWidth, sourceHeight, destX, destY, destWidth, destHeight); However, I have a canvas that fills the user's…
Avatar
  • 14,622
  • 9
  • 119
  • 198
15
votes
1 answer

How to crop a center square in a UIImage?

Sorry about this question, but I searched a lot of threads here in S.O. and I found nothing. The question is: how to crop a center square in a UIImage? I tried the code bellow but without success. The cropping happens, but in the upper-left…
Danilo Gomes
  • 767
  • 5
  • 15
14
votes
4 answers

iOS Audio Trimming

I searched a lot and couldn't find anything relevant... I am working on iOS audio files and here is what I want to do... Record Audio and Save Clip (Checked, I did this using AVAudioRecorder) Change the pitch (Checked, Did this using…
Muhammad Usama
  • 247
  • 1
  • 2
  • 8
14
votes
3 answers

Cropping CIImage with CICrop isn't working properly

I'm having troubles cropping image. For me CICrop filter is not working properly. If my CIVector x and y (origins) are 0 everything working fine (image is cropped from left bottom corner), image is cropped by my rectangle width and height, but if…
Justin Boo
  • 10,132
  • 8
  • 50
  • 71
14
votes
4 answers

Shared Element with scaleType centerCrop transition is jumpy

I'm trying to implement a shared elements transition when 2 ImageViews from one screen go to the next screen. one of the images has a scaleType of centerCrop on both screen. The problem I'm facing is that when the transition starts the image is…
14
votes
1 answer

Android ImageView centerCrop not working. Skewing instead of scaling

I'm currently working on a Navigation Drawer where I want the user photo to be scaled, cropped, tinted, then used as the header image behind a circular crop of there picture. I can't even post images because this account is too low rep...damn me and…
Pixel Perfect
  • 1,266
  • 1
  • 11
  • 14
14
votes
3 answers

How to remove blank space around an image in Android?

Given an image with alpha channel (transparency) I would like to remove any blank space between the image boundaries and the actual image. This should be done in a backgound task or with a loading screen, with an acceptable running time to not…
Manzotin
  • 768
  • 1
  • 7
  • 18
14
votes
4 answers

Android Bitmap save without transparent area

I want to save bitmap without transparent area. Bitmap has large transparent pixel. So i want to remove that How can i do this? I cant add picture so explain with symbols. I dont want to crop function. I hope use filter ┌────────────────────────┐ │ …
user1066874
  • 161
  • 2
  • 7
13
votes
3 answers

Android WallpaperManager crops image

I am working on a simple wallpaper app of some images that I have. They are .png files in drawable folders. Here are some code snippets: WallpaperManager myWallpaperManager = WallpaperManager.getInstance(getApplicationContext());…
yowza
  • 151
  • 2
  • 7
13
votes
7 answers

Avoid an image to go outside a div?

I have:
The image is bigger than 15px, so it's outside the div when you see it. How do I "crop" the image (show only the 15px port of it), only using css?
13
votes
2 answers

Crop out ggplot2 whitespace around plot

Is there a way to remove the white space surrounding a ggplot2 plot when the shape has been changed using coord_fixed()? I would like the white space above and below to be cropped away so that only the plotting area and axis labels remain. I am…
0mm3
  • 319
  • 2
  • 16
13
votes
1 answer

Why am I getting tile cannot extend outside image error when trying to split image in half

My program is supposed to take an image and split it vertically into n sections, then save the sections as individual png files. It should look something like this for 2 sections I'm having problems right now, what I'm getting is the first half of…
Keatinge
  • 4,330
  • 6
  • 25
  • 44
13
votes
5 answers

PHP crop image to fix width and height without losing dimension ratio

im looking to create thumbnails that has 100px by 100px dimension. i've seen many articles explaining the methods but most end up having the width!=height if the dimension ratio is to be kept. for example, i have a 450px by 350px image. i would like…
chrizonline
  • 4,779
  • 17
  • 62
  • 102
13
votes
9 answers

Crop image in CSS

I've created a two-column grid of images, which works fine with all-landscape images: Link. However, I've added a portrait image that throws off the layout, so I'd like to be able to "crop" the image so that the height matches the others'. I tried…
Mario Parra
  • 1,504
  • 3
  • 21
  • 46
13
votes
3 answers

Crop and upload image on client-side without server-side code involve

As title said. The requirement is to be able to crop an image before uploading the cropped image to the server. All the work should be done on the client-side. I have heard of the method to crop the image on the server and save it altogether. But as…
Ken
  • 323
  • 1
  • 3
  • 13