Git Product home page Git Product logo

qcropper's People

Contributors

qchenqizhi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

qcropper's Issues

originalImage.cropped(withCropperState: state) returns original image

image
I'm using the code Above to crop an Image. However the method returns the same image.

i receive the following state in the cropperDidConfirm:

(QCropper.CropperState) state = { viewFrame = (origin = (x = 0, y = 0), size = (width = 360, height = 640)) angle = 5.950118308257335 rotationAngle = 0 straightenAngle = -0.33306699892225122 flipAngle = 0 imageOrientationRawValue = (_value = 0) scrollViewTransform = { a = 0.94504405600579122 b = -0.32694301064271586 c = 0.32694301064271586 d = 0.94504405600579122 tx = 0 ty = 0 } scrollViewCenter = (x = 180, y = 226) scrollViewBounds = (origin = (x = 87.666666666666671, y = 0), size = (width = 407.0358613275223, height = 407.03586132752224)) scrollViewContentOffset = (x = 87.666666666666671, y = 0) scrollViewMinimumZoomScale = 1 scrollViewMaximumZoomScale = 20 scrollViewZoomScale = 2.6081443690409132 cropBoxFrame = (origin = (x = 20, y = 110), size = (width = 320, height = 320)) photoTranslation = (x = 214.75151497001622, y = 278.87409146634593) imageViewTransform = { a = 2.6081443690409132 b = 0 c = 0 d = 2.6081443690409132 tx = 0 ty = 0 } imageViewBoundsSize = (width = 309, height = 412) }

How can I crop the image using CIImage

This is great source code to crop the image.
Do you have any idea to crop the final image using CIImage? I'd like to apply CIFilter and crop the image.

SeiftUI

Looks great! Can I implement this into a SwiftUI app?

Keep cropbox position when rotate 90 degrees

Thanks for a good library.
Just wonder how can i keep the cropbox position when rotate 90 degree? I dont want the cropbox size and position changed when I rotate the scrollview.

looking forward your reply soon. Thanks

Flip Doesn’t Work Second time with initialState.

@qchenqizhi Thank you for this beautiful library. I’m facing a bug that when I just flip the image and click done. and then when I come back with initial state and again change just flip, this time it’s not allowing me to click done.
Is there no any support for flip in state management ?

How can I get pure cropRect without image like ToCropViewController

Hi, thank you for writing such a good framework, implementing a system photo crop editor becomes so easy with it now. But I have some problem while using it. It is hard to get a pure cropRect which size is relative to the original image's size. I don't really need the cropped image rendered, only the size matters, but I have no idea how to retrieve it through the method:

public func cropped(withCropperState cropperState: CropperState) -> UIImage?

Can you give me some hint how to do it?

如何设置图片的默认剪裁区域?

请问,我在打开剪裁界面时,想设置图片的默认剪裁区域(自动将图片上指定的剪裁区域,缩放至屏幕上合适的尺寸),我应该怎么设置?

Image pick from camera displaying black

@qchenqizhi While taking image using camera and passing image to below function displaying in black color.

let cropper = CropperViewController(originalImage: image)

    cropper.delegate = self

    picker.dismiss(animated: true) {
        self.present(cropper, animated: true, completion: nil)
    }

force image crop

how to force cropping an image with aspect ratio (9:16)without free scaling?

Cannot re-edit result image

Thank you for this nice tool.
I tried to re-crop result image and it returned old image without changes
My steps was like this

  1. Init cropper view
  2. Crop image and dismiss it
  3. Pick result image and try to crop again

I think Self.newTransformedImage cannot be created { maybe because of cgImage property is nil }

And second issue is I tried to crop image with circular overlay (isCircular = true) it returned rectangular result image.

Image flipping

Thanks for the best cropping component out there! I have a question: is there any way to avoid flipping an image itself and work out through view transforms during flipping? I'm working on another level cropping tool that uses metal view (MTKView) and I managed to integrate it inside QCropper. But still struggling with flipping.

Rotation using AngleRuler control does not rotate around center

Thanks for making this awesome component available.

When I use the AngleRuler control to rotate an image, it does not seem to rotate around the image center axis, as compared to other image editing tools.

It does seem to rotate around center if the image has been zoomed in. It's just in the initial state when image fits inside the overlay that it does not rotate around the center axis.

  • Bug appears to be in Rotatable.setStraightenAngle()

Is this a bug or is this as designed?

Thanks.

Minimum Ios version

Can you please provide on main page minimal Ios version, i see in project is 12.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.