All Projects → 3tinkers → Tkimageview

3tinkers / Tkimageview

An easy way to crop an image.

Projects that are alternatives of or similar to Tkimageview

Cropiwa
📐 Configurable Custom Crop widget for Android
Stars: ✭ 2,185 (+538.89%)
Mutual labels:  image, crop, photo, crop-image
Rskimagecropper
An image cropper / photo cropper for iOS like in the Contacts app with support for landscape orientation.
Stars: ✭ 2,371 (+593.27%)
Mutual labels:  image, crop, photo, editor
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 (+122.81%)
Mutual labels:  image, crop, crop-image
Smartcircle
✂️Automatically determine where to crop a circular image out of a rectangular.
Stars: ✭ 29 (-91.52%)
Mutual labels:  image, crop, crop-image
Photoflare
Quick, simple but powerful Cross Platform image editor.
Stars: ✭ 260 (-23.98%)
Mutual labels:  crop, photo, editor
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: ✭ 1,394 (+307.6%)
Mutual labels:  image, crop, crop-image
Flutter image cropper
A Flutter plugin for Android and iOS supports cropping images
Stars: ✭ 723 (+111.4%)
Mutual labels:  image, crop, photo
Flutter crop
Crop any widget/image in Android, iOS, Web and Desktop with fancy and customizable UI, in pure Dart code.
Stars: ✭ 107 (-68.71%)
Mutual labels:  image, crop, editor
Tocropviewcontroller
A view controller for iOS that allows users to crop portions of UIImage objects
Stars: ✭ 4,210 (+1130.99%)
Mutual labels:  image, crop, crop-image
Ddperspectivetransform
🔲 Warp image transformation
Stars: ✭ 186 (-45.61%)
Mutual labels:  image, crop, photo
Flutter image editor
Flutter plugin, support android/ios.Support crop, flip, rotate, color martix, mix image, add text. merge multi images.
Stars: ✭ 181 (-47.08%)
Mutual labels:  image, crop, editor
Pixel
📷 A composable image editor using Core Image and Metal.
Stars: ✭ 2,495 (+629.53%)
Mutual labels:  image, photo, editor
Ucrop
Image Cropping Library for Android
Stars: ✭ 11,003 (+3117.25%)
Mutual labels:  image, crop, photo
Igrphototweaks
Drag, Rotate, Scale and Crop
Stars: ✭ 212 (-38.01%)
Mutual labels:  image, crop, crop-image
vue-crop
[举个例子]https://codesandbox.io/s/910ro8ym9r [演示链接(戳我直达)]http://www.wwwwxy.top/html/blg/
Stars: ✭ 38 (-88.89%)
Mutual labels:  crop, crop-image
react-drop-n-crop
An opinionated implementation of react-dropzone and react-cropper
Stars: ✭ 17 (-95.03%)
Mutual labels:  crop, crop-image
Anyimagekit
A toolbox for pick/edit/capture photo or video. Written in Swift.
Stars: ✭ 324 (-5.26%)
Mutual labels:  crop-image, editor
downscale
Better image downscale with canvas.
Stars: ✭ 80 (-76.61%)
Mutual labels:  crop, photo
SSImagePicker
Easy to use and configurable library to Pick an image from the Gallery or Capture an image using a Camera... 📸
Stars: ✭ 227 (-33.63%)
Mutual labels:  crop, crop-image
Lassi-Android
All in 1 picker library for android.
Stars: ✭ 108 (-68.42%)
Mutual labels:  crop, photo

TKImageView

An easy way to crop an image.

Features

  • Both iPhone/iPad available
  • Support pinch gesture to zoom
  • Support pan gesture to move&resize
  • Support cutomize line width and color
  • Support cross line and middle line

System requirements

  • iOS 7.0 or higher

Samples

Properties

name type description
toCropImage UIImage 待裁剪的图片。
The image you want to crop.
needScaleCrop BOOL 是否需要缩放裁剪。
Determines whether you need to scale crop with pinch gesture or not.
showMidLines BOOL 是否需要显示每条边中间的线,这条中间线支持拖动手势。
Show the lines in the middle of each border, which can receive pan gesture to resize the crop area when the aspect ratio is ZERO.
showCrossLines BOOL 是否显示裁剪框内的交叉线。
Show the cross lines in the crop area.
cropAspectRatio CGFloat 设置裁剪框的宽高比。
The aspect retio you want to crop the image, equals to WIDTH / HEIGHT.
cropAreaBorderLineColor UIColor 设置裁剪边框的颜色。
The color of border lines.
cropAreaBorderLineWidth CGFloat 设置裁剪边框的线宽。
The width of border lines.
cropAreaCornerLineColor UIColor 设置裁剪边框四个角的颜色。
The line color of the corner.
cropAreaCornerLineWidth CGFloat 设置裁剪边框四个角的线宽。
The line width of the corner.
cropAreaCornerWidth CGFloat 设置裁剪边框四个角的宽度,这里指角的横边的长度。
The width of the corner area, indicate the length of the horizontal line of the corner.
cropAreaCornerHeight CGFloat 设置裁剪边框四个角的高度,这里指角的竖边的长度。
The height of the corner area, indicate the length of the vertical line of the corner.
minspace CGFloat 相邻角之间的最小距离。
The minimum distance between the corners.
cropAreaCrossLineWidth CGFloat 裁剪框内交叉线的宽度。
The width of cross lines.
cropAreaCrossLineColor UIColor 裁剪框内交叉线的颜色。
The color of cross lines.
cropAreaMidLineWidth CGFloat 裁剪边框每条边中间线的长度。
The width of middle lines.
cropAreaMidLineHeight CGFloat 裁剪边框每条边中间线的线宽。
The height of middle lines.
cropAreaMidLineColor UIColor 裁剪边框每条边中间线的颜色。
The color of middle lines.
maskColor UIColor 裁剪区域的蒙板颜色。
The color of the mask view which is always transparent black.
cornerBorderInImage BOOL 裁剪边框的四个角是否可以超出图片显示。
Whether the corner border inside the image or not.

Usage

TKImageView supports both initWithFrame and initWithCoder to initialize.You can customize your TKImageView instance with the properties to match your design.

@property (weak, nonatomic) IBOutlet TKImageView *tkImageView;
- (void)viewDidLoad {   
	_tkImageView.toCropImage = [UIImage imageNamed: @"test.jpg"];
	_tkImageView.showMidLines = YES;
	_tkImageView.needScaleCrop = YES;
	_tkImageView.showCrossLines = YES;
	_tkImageView.cornerBorderInImage = NO;
	_tkImageView.cropAreaCornerWidth = 44;
	_tkImageView.cropAreaCornerHeight = 44;
	_tkImageView.minSpace = 30;
	_tkImageView.cropAreaCornerLineColor = [UIColor whiteColor];
	_tkImageView.cropAreaBorderLineColor = [UIColor whiteColor];
	_tkImageView.cropAreaCornerLineWidth = 8;
	_tkImageView.cropAreaBorderLineWidth = 6;
	_tkImageView.cropAreaMidLineWidth = 30;
	_tkImageView.cropAreaMidLineHeight = 8;
	_tkImageView.cropAreaMidLineColor = [UIColor whiteColor];
	_tkImageView.cropAreaCrossLineColor = [UIColor whiteColor];
	_tkImageView.cropAreaCrossLineWidth = 6;    
}

Function

You can get the cropped image by this function.

- (UIImage *)currentCroppedImage;

Bug&Feature Report

If you find any bugs in my code or you think it is useful to add some features in this tool, please write a issue or mail to me [email protected], thanks a lot!

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].