forked from aryansbtloe/ExperimentWithTesseract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageFilter.h
executable file
·55 lines (46 loc) · 1.32 KB
/
ImageFilter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
// ImageFilter.h
// iphone-filters
//
// Created by Eric Silverberg on 6/16/11.
// Copyright 2011 Perry Street Software, Inc.
//
// Licensed under the MIT License.
//
#import <Foundation/Foundation.h>
enum {
CurveChannelNone = 0,
CurveChannelRed = 1 << 0,
CurveChannelGreen = 1 << 1,
CurveChannelBlue = 1 << 2,
};
typedef NSUInteger CurveChannel;
@interface UIImage (ImageFilter)
/* Filters */
- (UIImage*) greyscale;
- (UIImage*) sepia;
- (UIImage*) posterize:(int)levels;
- (UIImage*) saturate:(double)amount;
- (UIImage*) brightness:(double)amount;
- (UIImage*) gamma:(double)amount;
- (UIImage*) opacity:(double)amount;
- (UIImage*) contrast:(double)amount;
- (UIImage*) bias:(double)amount;
- (UIImage*) invert;
- (UIImage*)noise:(double)amount;
/* Color Correction */
- (UIImage*) levels:(NSInteger)black mid:(NSInteger)mid white:(NSInteger)white;
- (UIImage*) applyCurve:(NSArray*)points toChannel:(CurveChannel)channel;
- (UIImage*) adjust:(double)r g:(double)g b:(double)b;
/* Convolve Operations */
- (UIImage*) sharpen;
- (UIImage*) edgeDetect;
- (UIImage*) gaussianBlur:(NSUInteger)radius;
- (UIImage*) vignette;
- (UIImage*) darkVignette;
- (UIImage*) polaroidish;
/* Blend Operations */
- (UIImage*) overlay:(UIImage*)other;
/* Pre-packed filter sets */
- (UIImage*) lomo;
@end