Git Product home page Git Product logo

lecroppictureviewcontroller's People

Contributors

lucasecf avatar mergesort avatar ntnmrndn avatar readmecritic 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

Watchers

 avatar  avatar  avatar

lecroppictureviewcontroller's Issues

Moving cropper results in cut off images

I'm using the control, and the second I move it off center, it crops out a part of the image. An example below. Any thoughts? It's just out of the box working like this. (iOS 9/simulator)

cropper

cropped

Return crop rectangle in image coordinates

Since this view controller is used to pick out a section of an image of any size, it would be useful to return the crop rect so that the caller can then cut out the rect (or circle) from the original image. Currently the view controller only cuts out the image in the scaled image, resulting in a potentially lower res image.

Image from camera doesn't scale properly

If I use a UIImagePicker with .sourceType = .Camera, the resulting image in the LECropPictureViewController is incredibly thing and not scaled properly. Everything works totally fine with when the image is gathered from .sourceType = .PhotoLibrary. My didFinishPickingMediaWithInfo: method is below (in Swift):

func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {
    println(info)
    let originalImage = info[UIImagePickerControllerOriginalImage] as! UIImage

    let cropController = LECropPictureViewController(image: originalImage, andCropPictureType: LECropPictureType.Rounded)
    cropController.imageView.contentMode = UIViewContentMode.ScaleAspectFit

    cropController.photoAcceptedBlock = { (croppedImage: UIImage!) -> Void in
        let scaledImage = self.scaleImage(croppedImage, size: 300.0)
        let thumbnailImage = self.scaleImage(croppedImage, size: 100.0)

        self.profPic = scaledImage
        self.thumbnail = thumbnailImage
        self.refreshImageView(self.profPic!)

        picker.dismissViewControllerAnimated(true, completion: nil)
    }

    picker.pushViewController(cropController, animated: true)

}

Fixed crop square moving and resizing the image below

I would like to request a feature.

It would be good to have the option to have the crop square/circle fixed in the middle and have the user resize and move the image below to the location he wants.

I need a case where my image size should be 300x300, but users may want to put more inside the crop space then just having the image fullscreen.

Thanks!

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.