crop

image crop in ios using BJImageCropper

岁酱吖の 提交于 2019-12-10 22:04:44
问题 I am using BJImageCropper for image crop in iOS, but when I am touching on the image's last corner, it's automatically updating the height and width on the opposite side. Example code is https://github.com/barrettj/BJImageCropper/zipball/master 回答1: Get the commit I just pushed. Should be fixed there. 回答2: That is a bug in the code. Contact the author to correct the errors :) 回答3: You can use another option for croping Image that is ContextRect A short Example of it is : CGRect contextRect =

Performance issues when cropping UIImage (CoreGraphics, iOS)

ぐ巨炮叔叔 提交于 2019-12-10 21:14:27
问题 The basic idea of what we are trying to do is that we have a large UIImage, and we want to slice it into several pieces. The user of the function can pass in a number of rows and number of columns, and the image will be cropped accordingly (ie. 3 rows and 3 columns slices the image into 9 pieces). The problem is, we're having performance issues when trying to accomplish this with CoreGraphics. The largest grid we require is 5x5, and it takes several seconds for the operation to complete

Crop image with react-native

大兔子大兔子 提交于 2019-12-10 20:56:19
问题 Hello World, I trying to crop an image like explain on the React-native Doc <Image source={{uri: this.props.image, crop: {left: 50, top: 50, width: 100, height: 100}}} style={{height: 100, width: 100}}/> But it's doesn't work the image is not cropped. Any idea? 回答1: From the docs: On the infrastructure side, the reason is that it allows us to attach metadata to this object. For example if you are using require('./my-icon.png'), then we add information about its actual location and size (don't

Unsure how to crop image using CICrop

一个人想着一个人 提交于 2019-12-10 20:18:07
问题 I'm trying to crop an image with CICrop, but when I try to crop, it crashes with this error message: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key CIAttributeTypeRectangle.' *** First throw call stack: (0x1847fc2d8 0x1964c80e4 0x1847fbf5c 0x184e34a4c 0x185635480 0x10005e554 0x10005eb7c 0x1892a9398 0x189292474 0x1892a8d34 0x1892a89c0 0x1892a1efc 0x189275120 0x1895162b8

How to crop an image to a circle in c# / winforms?

泄露秘密 提交于 2019-12-10 18:36:31
问题 EDIT: the code given in the "duplicate" question didn't solve the problem for me. The main problem I'm having is that I can't simply use CSS and radius, which would be easy. It's an image being loaded in, in a winforms page/project. I have to try and make a square/rectangle image into a circle. I've tried following 2 methods (results will be posted beneath each): public Image RoundCorners(Image StartImage, int CornerRadius, Color BackgroundColor) { CornerRadius *= 2; Bitmap RoundedImage = new

PHP crop image in shape other than square like oval shape or round

北城以北 提交于 2019-12-10 17:12:11
问题 I want to crop images in PHP. Cropping in rectangular shape is all common and easy to do. Can you guide me that how i can crop image in shape other than square like in oval or round shape. 回答1: You can actually do that with ImageMagick ... See Crop or mask an image into a circle and Crop image into circle and add border for good examples 回答2: In addition to the previous answer, you can even blur the border with Image Magick's vignette effect, look for vignetteImage method. 来源: https:/

Cropping images in Itext

随声附和 提交于 2019-12-10 16:08:20
问题 is there an easy way to crop an Image in Itext? I have the following code: URL url = new URL(imgUrl); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); iStream = connection.getInputStream(); img = new Jpeg(url); // a method like // img.crop(x1, y1, x2, y2) would be nice. Now I want to "delete" a strip of let's say 20 pixels left and 20 pixels right. Is there an easy way to do this? 回答1: You could investigate using the clipping path. You'll need to know

circular crop to circular border on hover

泄露秘密 提交于 2019-12-10 15:44:43
问题 I have an unordered list displayed as a table. Each list element contains an image and a name/title. The image is cropped to a circle. On hover, I would like the circular crop to become a circular border around the image, such that we see the full image with a circle around the face. My inspiration is from this site: I have successfully cropped the image to a circle, but I am having trouble with the border on hover. You can view my JSFiddle here section.team { margin: auto; background:

Avoid an image to go outside a div?

六眼飞鱼酱① 提交于 2019-12-10 13:06:15
问题 I have: <div style="height:15px"> <img src="image" /> </div> 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? 回答1: You need overflow:hidden see an example here: http://www.jsfiddle.net/S8qAq/ Read about overflow : here W3Schools Good luck! 回答2: Try giving an overflow:hidden to the div. 回答3: add overflow:hidden; to your div style. 回答4: Use the overflow css property: overflow: hidden; 回答5: use

Modify Android crop intent

好久不见. 提交于 2019-12-10 11:54:34
问题 I have created a sample app for cropping images and I am calling the built-in crop intent. Here is my code: Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*"); intent.setData(mImageCaptureUri); intent.putExtra("outputX", 200); intent.putExtra("outputY", 200); intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); intent.putExtra("scale", true); intent.putExtra("return-data", true); How can I modify the crop area as per the user's input? 回答1: Yes you