All Projects → IGRSoft → Igrphototweaks

IGRSoft / Igrphototweaks

Licence: mit
Drag, Rotate, Scale and Crop

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Igrphototweaks

Tocropviewcontroller
A view controller for iOS that allows users to crop portions of UIImage objects
Stars: ✭ 4,210 (+1885.85%)
Mutual labels:  image-processing, image, crop, crop-image, cropping
Flyimg
Dockerized PHP7 application runs as a Microservice to resize and crop images on the fly. Get optimised images with MozJPEG, WebP or PNG using ImageMagick. Includes face detection, cropping, face blurring, image rotation and many other options. Abstract storage based on FlySystem in order to store images on any provider (local, AWS S3...).
Stars: ✭ 762 (+259.43%)
Mutual labels:  image-processing, image, crop, crop-image
Ucrop
Image Cropping Library for Android
Stars: ✭ 11,003 (+5090.09%)
Mutual labels:  scale, image, crop, rotation
Smartcircle
✂️Automatically determine where to crop a circular image out of a rectangular.
Stars: ✭ 29 (-86.32%)
Mutual labels:  image-processing, image, crop, crop-image
Imgproxy
Fast and secure standalone server for resizing and converting remote images
Stars: ✭ 5,688 (+2583.02%)
Mutual labels:  image-processing, image, crop-image
Fmphotopicker
A modern, simple and zero-dependency photo picker with an elegant and customizable image editor
Stars: ✭ 428 (+101.89%)
Mutual labels:  image, photos, crop
Rskimagecropper
An image cropper / photo cropper for iOS like in the Contacts app with support for landscape orientation.
Stars: ✭ 2,371 (+1018.4%)
Mutual labels:  image, crop, cropping
Tkimageview
An easy way to crop an image.
Stars: ✭ 342 (+61.32%)
Mutual labels:  image, crop, crop-image
React Easy Crop
A React component to crop images/videos with easy interactions
Stars: ✭ 1,093 (+415.57%)
Mutual labels:  crop, crop-image, cropping
React Native Easy Gestures
React Native Gestures. Support: Drag, Scale and Rotate a Component.
Stars: ✭ 153 (-27.83%)
Mutual labels:  scale, drag, rotation
Lipo
👄 Free image manipulation API service built on top of Sharp (an alternative to Jimp, Graphics Magic, Image Magick, and PhantomJS)
Stars: ✭ 101 (-52.36%)
Mutual labels:  scale, image, crop
Svelte Easy Crop
A Svelte component to crop images with easy interactions
Stars: ✭ 80 (-62.26%)
Mutual labels:  crop, crop-image, cropping
Cropiwa
📐 Configurable Custom Crop widget for Android
Stars: ✭ 2,185 (+930.66%)
Mutual labels:  image, crop, crop-image
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: ✭ 21,131 (+9867.45%)
Mutual labels:  image-processing, image, crop
React Native Image Crop Picker
iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
Stars: ✭ 5,261 (+2381.6%)
Mutual labels:  image, crop, cropping
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: ✭ 4,107 (+1837.26%)
Mutual labels:  image-processing, image, crop-image
Cropme
Extremely Smooth and Easy Cropping library for you
Stars: ✭ 306 (+44.34%)
Mutual labels:  image, crop-image, cropping
Korkut
Quick and simple image processing at the command line. 🔨
Stars: ✭ 310 (+46.23%)
Mutual labels:  image-processing, image, crop
Phototweaks
Drag, Rotate, Scale and Crop
Stars: ✭ 1,214 (+472.64%)
Mutual labels:  photos, crop, drag
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: ✭ 1,394 (+557.55%)
Mutual labels:  image, crop, crop-image

[The Project is not served, please, enjoy forward :)]

U can use Mantis

IGRPhotoTweaks

IGRPhotoTweaks

IGRPhotoTweaks is a swift 4.2 library allow to expand an interface to crop photos, based on PhotoTweaks. It can let user drag, rotate, scale the image, and crop it. You will find it mimics the interaction of Photos.app on iOS 9. :]

Build Status Pod Version Platform License


Contribute to Development Goals Here:

BTC: 16tGJzt4gJJBhBetpV6BuaWuNfxvkdkbt4

BCH: bitcoincash:qpcwefpxddjqzdpcrx6tek3uh6x9v7t8tugu30jvks

LTC: litecoin:MLZxuAdJCaW7LdM4sQuRazgdNvd8G2bdyt


Usage

IGRPhotoTweaksViewController is a base interface for YourPhotoTweaksViewController. IGRPhotoTweaksViewController offers all the operations to crop the photo, which includes translation, rotate and scale.

To use it,

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if segue.identifier == "showCrop" {

        let yourCropViewController = segue.destination as! YourPhotoTweaksViewController
        yourCropViewController.image = sender as! UIImage
        yourCropViewController.delegate = self;
    }
}

self.cropAction() is the func calls the edit done action.

self.dismissAction() is the func calls the cancel edit action.

self.changedAngel(value: radians) is the func to set rotation angle.

self.setCropAspectRect(aspect: "9:16") is the func to set aspect ratio for crop view.

self.resetAspectRect() is the func resets all previous aspect ratio.

self.resetView() is the func resets all previous actions.

Get the cropped image

extension ViewController: IGRPhotoTweakViewControllerDelegate {
    func photoTweaksController(_ controller: IGRPhotoTweakViewController, didFinishWithCroppedImage croppedImage: UIImage) {
        self.imageView?.image = croppedImage
        _ = controller.navigationController?.popViewController(animated: true)
    }

    func photoTweaksControllerDidCancel(_ controller: IGRPhotoTweakViewController) {
        _ = controller.navigationController?.popViewController(animated: true)
    }
}

Setup IGRPhotoTweaks Controller

override func viewDidLoad() {
    super.viewDidLoad()

    self.isAutoSaveToLibray = true
}

Setup/Control Angle

fileprivate func setupSlider() {
    self.angleSlider?.minimumValue = -Float(IGRRadianAngle.toRadians(45))
    self.angleSlider?.maximumValue = Float(IGRRadianAngle.toRadians(45))
    self.angleSlider?.value = 0.0
}

@IBAction func onChandeAngleSliderValue(_ sender: UISlider) {
    let radians: CGFloat = CGFloat(sender.value)
    self.changeAngle(radians: radians)
}
    

Customize View

override open func setupThemes() {
    IGRCropLine.appearance().backgroundColor = UIColor.green
    IGRCropGridLine.appearance().backgroundColor = UIColor.yellow
    IGRCropCornerView.appearance().backgroundColor = UIColor.purple
    IGRCropCornerLine.appearance().backgroundColor = UIColor.orange
    IGRCropMaskView.appearance().backgroundColor = UIColor.blue
    IGRPhotoContentView.appearance().backgroundColor = UIColor.gray
    IGRPhotoTweakView.appearance().backgroundColor = UIColor.brown
}

override open func customBorderColor() -> UIColor {
    return UIColor.red
}

override open func customBorderWidth() -> CGFloat {
    return 2.0
}

override open func customCornerBorderWidth() -> CGFloat {
    return 4.0
}

override open func customCropLinesCount() -> Int {
    return 3
}

override open func customGridLinesCount() -> Int {
    return 4
}

override open func customCornerBorderLength() -> CGFloat {
    return 30.0
}

override open func customIsHighlightMask() -> Bool {
    return true
}

override open func customHighlightMaskAlphaValue() -> CGFloat {
    return 0.3
}


Example

IGRPhotoTweaks.xcodeproj -> IGRPhotoTweaks target /Example


Installation

IGRPhotoTweaks is available on CocoaPods. Add the follwing to your Podfile:

pod 'IGRPhotoTweaks', '~> 1.0.0'

Alternatively, you can manually drag the IGRPhotoTweaks folder into your Xcode project.


Issues

Not works in Objective-C


Protip

If using with an existing UIImagePickerController, be sure to set allowsEditing = NO otherwise you may force the user to crop with the native editing tool before showing IGRPhotoTweaksViewController.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].