File tree 5 files changed +86
-4
lines changed
DDBlackWhiteExample/DDBlackWhiteExample.xcodeproj
5 files changed +86
-4
lines changed Original file line number Diff line number Diff line change
1
+ Pod ::Spec . new do |spec |
2
+
3
+ spec . name = "DDBlackWhite"
4
+ spec . platform = :ios
5
+ spec . summary = "DDBlackWhite allows a user to make his image black and white"
6
+ spec . requires_arc = true
7
+ spec . version = "0.0.2"
8
+ spec . license = { :type => "MIT" , :file => "LICENSE" }
9
+ spec . author = { "Dmitriy Dotsenko" => "d.dotsenko@icloud.com" }
10
+ spec . homepage = "https://github.com/d-dotsenko/DDBlackWhite"
11
+ spec . source = { :git => "https://github.com/d-dotsenko/DDBlackWhite.git" , :tag => "#{ spec . version } " }
12
+ spec . frameworks = "UIKit"
13
+ spec . source_files = "DDBlackWhite/**/*.{h,swift}"
14
+ spec . swift_version = "4.2"
15
+ spec . ios . deployment_target = "9.0"
16
+ end
Original file line number Diff line number Diff line change 193
193
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
194
194
GCC_WARN_UNUSED_FUNCTION = YES;
195
195
GCC_WARN_UNUSED_VARIABLE = YES;
196
- IPHONEOS_DEPLOYMENT_TARGET = 12.1 ;
196
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0 ;
197
197
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
198
198
MTL_FAST_MATH = YES;
199
199
ONLY_ACTIVE_ARCH = YES;
251
251
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
252
252
GCC_WARN_UNUSED_FUNCTION = YES;
253
253
GCC_WARN_UNUSED_VARIABLE = YES;
254
- IPHONEOS_DEPLOYMENT_TARGET = 12.1 ;
254
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0 ;
255
255
MTL_ENABLE_DEBUG_INFO = NO;
256
256
MTL_FAST_MATH = YES;
257
257
SDKROOT = iphoneos;
275
275
DYLIB_INSTALL_NAME_BASE = "@rpath";
276
276
INFOPLIST_FILE = DDBlackWhite/Info.plist;
277
277
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
278
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
278
279
LD_RUNPATH_SEARCH_PATHS = (
279
280
"$(inherited)",
280
281
"@executable_path/Frameworks",
301
302
DYLIB_INSTALL_NAME_BASE = "@rpath";
302
303
INFOPLIST_FILE = DDBlackWhite/Info.plist;
303
304
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
305
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
304
306
LD_RUNPATH_SEARCH_PATHS = (
305
307
"$(inherited)",
306
308
"@executable_path/Frameworks",
Original file line number Diff line number Diff line change 271
271
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
272
272
GCC_WARN_UNUSED_FUNCTION = YES;
273
273
GCC_WARN_UNUSED_VARIABLE = YES;
274
- IPHONEOS_DEPLOYMENT_TARGET = 12.1 ;
274
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0 ;
275
275
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
276
276
MTL_FAST_MATH = YES;
277
277
ONLY_ACTIVE_ARCH = YES;
326
326
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
327
327
GCC_WARN_UNUSED_FUNCTION = YES;
328
328
GCC_WARN_UNUSED_VARIABLE = YES;
329
- IPHONEOS_DEPLOYMENT_TARGET = 12.1 ;
329
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0 ;
330
330
MTL_ENABLE_DEBUG_INFO = NO;
331
331
MTL_FAST_MATH = YES;
332
332
SDKROOT = iphoneos;
343
343
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
344
344
CODE_SIGN_STYLE = Automatic;
345
345
INFOPLIST_FILE = DDBlackWhiteExample/Info.plist;
346
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
346
347
LD_RUNPATH_SEARCH_PATHS = (
347
348
"$(inherited)",
348
349
"@executable_path/Frameworks",
361
362
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
362
363
CODE_SIGN_STYLE = Automatic;
363
364
INFOPLIST_FILE = DDBlackWhiteExample/Info.plist;
365
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
364
366
LD_RUNPATH_SEARCH_PATHS = (
365
367
"$(inherited)",
366
368
"@executable_path/Frameworks",
Original file line number Diff line number Diff line change
1
+ # DDBlackWhite
2
+
3
+ [ ![ Language] ( http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat )] ( https://developer.apple.com/swift )
4
+ [ ![ Platform] ( https://img.shields.io/cocoapods/p/DDBlackWhite.svg?style=flat )] ( http://cocoapods.org/pods/DDBlackWhite )
5
+ [ ![ License] ( https://img.shields.io/cocoapods/l/DDBlackWhite.svg?style=flat )] ( http://cocoapods.org/pods/DDBlackWhite )
6
+ [ ![ Version] ( https://img.shields.io/cocoapods/v/DDBlackWhite.svg?style=flat )] ( http://cocoapods.org/pods/DDBlackWhite )
7
+
8
+
9
+ Make your image black and white
10
+
11
+ <img src =" Info/DDBlackWhite.gif?raw=true " alt =" DDBlackWhite " width =320 >
12
+
13
+ ## Installation
14
+
15
+ ### CocoaPods
16
+
17
+ To install ` DDBlackWhite ` via [ CocoaPods] ( http://cocoapods.org ) , add the following line to your Podfile:
18
+
19
+ ```
20
+ pod 'DDBlackWhite'
21
+ ```
22
+
23
+ ### Manually
24
+
25
+ Add ` DDBlackWhite ` folder to your Xcode project.
26
+
27
+ ## Usage
28
+
29
+ See the example Xcode project.
30
+
31
+ ### Basic setup
32
+
33
+ Create the ` DDBlackWhite ` instance, set the ` inputImage ` and ` brightness ` variables.
34
+ Call ` getFilteredImage ` method and its closure will return the filtered image.
35
+
36
+ ``` swift
37
+ let blackWhite = DDBlackWhite ()
38
+ blackWhite.inputImage = image
39
+ blackWhite.brightness = 0.8
40
+ blackWhite.getFilteredImage { (image) in
41
+ // filtered image received
42
+ }
43
+ ```
44
+
45
+ ### Populating the data
46
+
47
+ ``` swift
48
+ var inputImage: UIImage?
49
+ private (set ) var outputImage: UIImage?
50
+ var brightness: CGFloat // The filter brightness value (0.0 ... 1.0), Default is 0.5
51
+
52
+ func getFilteredImage (closure : @escaping (UIImage? )-> Void )
53
+ ```
54
+
55
+ ## Requirements
56
+
57
+ - iOS 9.0
58
+ - Xcode 10, Swift 4.2
59
+
60
+ ## License
61
+
62
+ ` DDBlackWhite ` is available under the MIT license. See the LICENSE file for more info.
You can’t perform that action at this time.
0 commit comments