crop

can i crop image by coordinates like (10,10,320,312)?

浪子不回头ぞ 提交于 2019-12-12 06:28:56
问题 Goal : How Crop a image after zooming. can i crop image after zooming at predefined coordinates like (10,10,320,312). my UIImageView has this size? I have a UIImageView in a UIScrollView and I can zoom my image. I wants after zooming when I press cropButton the image which is displaying in UIImage is cropped. I wants size of image equal to UIImageView size. thanks !! before zooming after zoom and crop my code is here. -(void)cropButtonClicked { //Calculate the required area from the

How to Passing Uiimage from one view controller to Other view controller when using popvivew controller used?

☆樱花仙子☆ 提交于 2019-12-12 03:48:41
问题 I Have Two View controllers. First UIViewController contain one UIImage, when I click "crop" button, go to second view controller I pass the image by push view controller, here I'am cropping my UIImage. In second UIViewController after cropping my image, clicking "done" button, I need to pass the cropped image to first view. Problem is when I use pop-view controller, image is not passing. 回答1: Try like this. First view controller should have a property @property (assign)UIImage *croppedImage;

How to convert CAShapeLayer coordinates to CIRectangleFeature for manual crop

*爱你&永不变心* 提交于 2019-12-12 03:43:57
问题 I am dealing with manual image crop functionality. For this am drawing CAShapeLayer with four coordinates called topLeft, topRight, bottomRight and bottomLeft. User can pan the points and select the crop area. I am stuck at converting these points to Core image coordinates and further cropping with CIPerspectiveTransform. 回答1: Set image to imageView And masking imageView with shape layer. self.imageView = img imageView.layer.mask = shapeLayer // set here your shape layer Now your imageView

Crop image data using Renderscript Launch Options

折月煮酒 提交于 2019-12-12 02:53:52
问题 I have an byte[] array of a greyvalue image dataIn with dimension width * height. Now, I want to crop the image by applying a translation (dx, dy) and cut-off the out-of-border regions, so that the dataOut has dimension (width-abs(dx))*(height-abs(dy)). In RenderScript I would use a 2-d uchar-Allocation both for the input and the output. In order to efficiently apply the crop operation, it was thinking of using the LaunchOptions with (for example) setX(dx,width) and setY(0, height-dy) and

Change cropper size of UIImagePickerController

冷暖自知 提交于 2019-12-12 02:45:37
问题 I want to change the cropper size of UIImagePickerView from (320*320) to (320 * 240) . I have searched it everywhere, but none them is working fine for me . I have used GKImagePicker https://github.com/gekitz/GKImagePicker But when i just drag its classes to my project . It gives me error . What to do ??? Any help much appreciated . Need to resize cropper like in image below 回答1: Those errors are fixed by importing UIKit/UIKit.h to GKImagePicker.h 来源: https://stackoverflow.com/questions

Image uploader + crop

旧城冷巷雨未停 提交于 2019-12-12 02:17:07
问题 I'm running a web application built on Seam. I would like to have an image upload + crop component.Preferably on client side, so the image uploaded to the server would be the result of the crop. I read this can be made with Flash 10. I was thinking flex is also a possibility. Does anyone has good hints to give me, what component to choose or what is the best way to connect the backing bean I have with the flash/flex? Thank you! 回答1: A search for Flash uploaders shows many: From the

cropping image and save to specific folder in sdcard (Android)?

送分小仙女□ 提交于 2019-12-12 01:32:40
问题 I've image has been crop. I want that image save to folder (sdcard)...I've already done crop image and show to imageview, but my problem is, I don't know how saving image crop to sdcard ? here is my code has success to crop an image.. Bundle extras = data.getExtras(); if (extras != null) { Bitmap photo = extras.getParcelable("data"); mImageView.setImageBitmap(photo); } where I can add the code to save an image that have been cropped? 回答1: Try out this way: Bundle m_extras = data.getExtras();

How to corp a picture into any shape via a template in android?

柔情痞子 提交于 2019-12-12 00:55:27
问题 I wanted to know if it was possible to crop a picture to any other shape not just square, rectangle or circle. Basically what I am looking for is that, the user can select a template of a png file (already present) and it cuts the picture in that shape. 回答1: Check out this code: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ImageView

How to Crop the image in android marshmallow by using default crop intent?

为君一笑 提交于 2019-12-12 00:54:54
问题 In my application requirement is select the image from gallery and then crop the selected image and set to the imageview. Below is my sample code for cropping the image. //call the standard crop action intent (the user device may not support it) Intent cropIntent = new Intent("com.android.camera.action.CROP"); cropIntent.setClassName("com.android.camera", "com.android.camera.CropImage"); //indicate image type and Uri cropIntent.setDataAndType(mImageCaptureUri, "image/*"); //set crop

How to use Camera Intent with Crop Intent both at one Intent in Webview

爷,独闯天下 提交于 2019-12-11 23:36:59
问题 I followed this to use camera from web-view..with upload,,, So in that I am getting Default camera.. and I am capturing.. and Uploading... So I want to Crop them...and Upload.. with Max 2 Megapixel resolution not more than 2Mp... I followed this to use Crop... I it Possible to use both intents together in web-view... and resolution should be low.. I mean after capture it should show crop... option... and then upload,,, Can any one suggest me... 回答1: private void pickImage() { AlertDialog