├── .gitignore
├── ColorCubeGenerator.psd
├── InstaCubeExample
├── InstaCube
│ ├── Info.plist
│ ├── InstaCube.h
│ ├── InstaCubeGenerator.h
│ └── InstaCubeGenerator.m
├── InstaCubeExample.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcbaselines
│ │ └── 7672F175194DE3F800BAAE5A.xcbaseline
│ │ ├── DD57F4EF-15FA-4AE9-867B-1ECC8BE83EAD.plist
│ │ └── Info.plist
├── InstaCubeExample
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ └── Main.storyboard
│ ├── ColorCubeViewController.swift
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-Small@2x.png
│ │ │ ├── ios7_app_icon_iphone@2x.png
│ │ │ └── ios7_spotlight_icon@2x.png
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── InstaCubeExample-Bridging-Header.h
│ ├── colorCube_chrome.png
│ ├── colorCube_green.png
│ ├── colorCube_inverse.png
│ ├── colorCube_moody.png
│ ├── colorCube_posterize.png
│ ├── colorCube_solarize.png
│ ├── colorCube_threshold.png
│ ├── colorCube_vibrance.png
│ ├── colorCube_warming.png
│ ├── example.png
│ └── main.m
├── InstaCubeExampleTests
│ ├── Info.plist
│ └── InstaCubeExampleTests.m
└── InstaCubeTests
│ ├── Info.plist
│ └── InstaCubeTests.m
├── LICENSE
├── README.md
└── Readme Images
├── After.png
├── Before.png
├── appleCube.png
└── colorCube-16.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # CocoaPods
2 | #
3 | # We recommend against adding the Pods directory to your .gitignore. However
4 | # you should judge for yourself, the pros and cons are mentioned at:
5 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
6 | #
7 | # Pods/
8 |
9 |
--------------------------------------------------------------------------------
/ColorCubeGenerator.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/ColorCubeGenerator.psd
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCube/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.sushiGrass.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCube/InstaCube.h:
--------------------------------------------------------------------------------
1 | //
2 | // InstaCube.h
3 | // InstaCube
4 | //
5 | // Created by mrJacob on 6/14/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class CIFilter;
12 |
13 | //! Project version number for InstaCube.
14 | FOUNDATION_EXPORT double InstaCubeVersionNumber;
15 |
16 | //! Project version string for InstaCube.
17 | FOUNDATION_EXPORT const unsigned char InstaCubeVersionString[];
18 |
19 | // In this header, you should import all the public headers of your framework using statements like #import
20 | #import
21 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCube/InstaCubeGenerator.h:
--------------------------------------------------------------------------------
1 | //
2 | // InstaCubeGenerator.h
3 | // InstaCube
4 | //
5 | // Created by mrJacob on 6/14/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @class CIFilter;
13 |
14 | @interface InstaCubeGenerator : NSObject
15 |
16 | + (CIFilter *)instaCubeWithKeyImageName:(NSString *)keyImageString onBundle:(NSBundle *)bundleOrNil;
17 |
18 | + (CIFilter *)instaCubeWithKeyImage:(UIImage *)keyImage;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCube/InstaCubeGenerator.m:
--------------------------------------------------------------------------------
1 | //
2 | // InstaCubeGenerator.m
3 | // InstaCube
4 | //
5 | // Created by mrJacob on 6/14/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import "InstaCubeGenerator.h"
10 | #import
11 | #import
12 |
13 | @implementation InstaCubeGenerator
14 |
15 | #pragma mark - public methods
16 |
17 | + (CIFilter *)instaCubeWithKeyImageName:(NSString *)keyImageString onBundle:(NSBundle *)bundleOrNil {
18 | NSBundle *bundle = (bundleOrNil) ? : [NSBundle mainBundle];
19 | UIImage *keyImage = [UIImage imageNamed:keyImageString
20 | inBundle:bundle
21 | compatibleWithTraitCollection:nil];
22 | if (keyImage) {
23 | return [self instaCubeWithKeyImage:keyImage];
24 | }
25 |
26 | return nil;
27 | }
28 |
29 | + (CIFilter *)instaCubeWithKeyImage:(UIImage *)keyImage {
30 |
31 | CGImageRef keyCgImage = keyImage.CGImage;
32 | int sizeOfCube = floor(CGImageGetWidth(keyCgImage));
33 | NSData *colorCubeNSData = [self colorCubeDataForCGImageRef:keyCgImage];
34 |
35 | CGColorSpaceRef colorSpace;
36 | colorSpace = CGColorSpaceCreateDeviceRGB();
37 |
38 | CIFilter *instaCube = [CIFilter filterWithName:@"CIColorCubeWithColorSpace"
39 | withInputParameters:@{@"inputCubeDimension" : @(sizeOfCube),
40 | @"inputCubeData" : colorCubeNSData,
41 | @"inputColorSpace" : (__bridge id) colorSpace}];
42 |
43 | CGColorSpaceRelease(colorSpace);
44 | return instaCube;
45 | }
46 |
47 | #pragma mark - private methods
48 |
49 | +(NSData *) colorCubeDataForCGImageRef:(CGImageRef)imageRef {
50 |
51 | NSData *cubeNSData;
52 | const unsigned int size = floor(CGImageGetWidth(imageRef));
53 |
54 | NSUInteger cubeDataSize = ( size * size * size * sizeof(char) * 4);
55 | char *cubeCharData = [self convertCGImageRefToBitmapRGBA8CharData:imageRef];
56 |
57 | cubeNSData = [NSData dataWithBytesNoCopy:cubeCharData length:cubeDataSize freeWhenDone:YES];
58 |
59 | return cubeNSData;
60 | }
61 |
62 | + (char *) convertCGImageRefToBitmapRGBA8CharData:(CGImageRef)imageRef {
63 |
64 | // Create a bitmap context to draw the uiimage into
65 | CGContextRef context = [self newBitmapRGBA8ContextFromImage:imageRef];
66 |
67 | if(!context) {
68 | return NULL;
69 | }
70 |
71 | size_t width = CGImageGetWidth(imageRef);
72 | size_t height = CGImageGetHeight(imageRef);
73 |
74 | CGRect rect = CGRectMake(0, 0, width, height);
75 |
76 | // Draw image into the context to get the raw image data
77 | CGContextDrawImage(context, rect, imageRef);
78 |
79 | // Get a pointer to the data
80 | char *bitmapData = ( char *)CGBitmapContextGetData(context);
81 |
82 | // Copy the data and release the memory (return memory allocated with new)
83 | size_t bytesPerRow = CGBitmapContextGetBytesPerRow(context);
84 | size_t bufferLength = bytesPerRow * height;
85 |
86 | char *newBitmap = NULL;
87 |
88 | if(bitmapData) {
89 | newBitmap = ( char *)malloc(sizeof( char) * bytesPerRow * height);
90 |
91 | if(newBitmap) { // Copy the data
92 | for(size_t i = 0; i < bufferLength; ++i) {
93 | newBitmap[i] = bitmapData[i];
94 | }
95 | }
96 |
97 | free(bitmapData);
98 |
99 | } else {
100 | NSLog(@"Error getting bitmap pixel data\n");
101 | free(bitmapData);
102 | }
103 |
104 | CGContextRelease(context);
105 |
106 | return newBitmap;
107 | }
108 |
109 | + (CGContextRef) newBitmapRGBA8ContextFromImage:(CGImageRef) image {
110 | CGContextRef context = NULL;
111 | CGColorSpaceRef colorSpace;
112 | uint32_t *bitmapData;
113 |
114 | size_t bitsPerPixel = 32;
115 | size_t bitsPerComponent = 8;
116 | size_t bytesPerPixel = bitsPerPixel / bitsPerComponent;
117 |
118 | size_t width = CGImageGetWidth(image);
119 | size_t height = CGImageGetHeight(image);
120 |
121 | size_t bytesPerRow = width * bytesPerPixel;
122 | size_t bufferLength = bytesPerRow * height;
123 |
124 | colorSpace = CGColorSpaceCreateDeviceRGB();
125 |
126 | if(!colorSpace) {
127 | NSLog(@"Error allocating color space RGB\n");
128 | return NULL;
129 | }
130 |
131 | // Allocate memory for image data
132 | bitmapData = (uint32_t *)malloc(bufferLength);
133 |
134 | if(!bitmapData) {
135 | NSLog(@"Error allocating memory for bitmap\n");
136 | CGColorSpaceRelease(colorSpace);
137 | return NULL;
138 | }
139 |
140 | //Create bitmap context
141 | context = CGBitmapContextCreate(bitmapData,
142 | width,
143 | height,
144 | bitsPerComponent,
145 | bytesPerRow,
146 | colorSpace,
147 | (CGBitmapInfo)kCGImageAlphaPremultipliedLast); // RGBA
148 | if(!context) {
149 | free(bitmapData);
150 | NSLog(@"Bitmap context not created");
151 | }
152 |
153 | CGColorSpaceRelease(colorSpace);
154 |
155 | return context;
156 | }
157 |
158 | @end
159 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 7627499B195A432800688499 /* colorCube_inverse.png in Resources */ = {isa = PBXBuildFile; fileRef = 7627499A195A432800688499 /* colorCube_inverse.png */; };
11 | 7672F147194DE3E000BAAE5A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7672F146194DE3E000BAAE5A /* main.m */; };
12 | 7672F14A194DE3E000BAAE5A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7672F149194DE3E000BAAE5A /* AppDelegate.m */; };
13 | 7672F150194DE3E000BAAE5A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7672F14E194DE3E000BAAE5A /* Main.storyboard */; };
14 | 7672F152194DE3E000BAAE5A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7672F151194DE3E000BAAE5A /* Images.xcassets */; };
15 | 7672F15E194DE3E000BAAE5A /* InstaCubeExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7672F15D194DE3E000BAAE5A /* InstaCubeExampleTests.m */; };
16 | 7672F171194DE3F800BAAE5A /* InstaCube.h in Headers */ = {isa = PBXBuildFile; fileRef = 7672F170194DE3F800BAAE5A /* InstaCube.h */; settings = {ATTRIBUTES = (Public, ); }; };
17 | 7672F177194DE3F800BAAE5A /* InstaCube.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7672F16C194DE3F800BAAE5A /* InstaCube.framework */; };
18 | 7672F17E194DE3F800BAAE5A /* InstaCubeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7672F17D194DE3F800BAAE5A /* InstaCubeTests.m */; };
19 | 7672F181194DE3F800BAAE5A /* InstaCube.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7672F16C194DE3F800BAAE5A /* InstaCube.framework */; };
20 | 7672F182194DE3F800BAAE5A /* InstaCube.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7672F16C194DE3F800BAAE5A /* InstaCube.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
21 | 7672F19C194DE83000BAAE5A /* ColorCubeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7672F19B194DE83000BAAE5A /* ColorCubeViewController.swift */; };
22 | 7672F19F194DE9F800BAAE5A /* InstaCubeGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7672F19D194DE9F800BAAE5A /* InstaCubeGenerator.h */; settings = {ATTRIBUTES = (Public, ); }; };
23 | 7672F1A0194DE9F800BAAE5A /* InstaCubeGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 7672F19E194DE9F800BAAE5A /* InstaCubeGenerator.m */; };
24 | 7672F1D0194DF63000BAAE5A /* colorCube_vibrance.png in Resources */ = {isa = PBXBuildFile; fileRef = 7672F1CD194DF63000BAAE5A /* colorCube_vibrance.png */; };
25 | 7672F1D1194DF63000BAAE5A /* colorCube_threshold.png in Resources */ = {isa = PBXBuildFile; fileRef = 7672F1CE194DF63000BAAE5A /* colorCube_threshold.png */; };
26 | 7672F1D2194DF63000BAAE5A /* colorCube_solarize.png in Resources */ = {isa = PBXBuildFile; fileRef = 7672F1CF194DF63000BAAE5A /* colorCube_solarize.png */; };
27 | 7672F1D4194DF76C00BAAE5A /* example.png in Resources */ = {isa = PBXBuildFile; fileRef = 7672F1D3194DF76C00BAAE5A /* example.png */; };
28 | 76B54218194FA0C2009495D5 /* colorCube_warming.png in Resources */ = {isa = PBXBuildFile; fileRef = 76B54216194FA0C2009495D5 /* colorCube_warming.png */; };
29 | 76B54219194FA0C2009495D5 /* colorCube_green.png in Resources */ = {isa = PBXBuildFile; fileRef = 76B54217194FA0C2009495D5 /* colorCube_green.png */; };
30 | 76B5421B194FA22D009495D5 /* colorCube_moody.png in Resources */ = {isa = PBXBuildFile; fileRef = 76B5421A194FA22D009495D5 /* colorCube_moody.png */; };
31 | 76B54220194FE550009495D5 /* colorCube_moody.png in Resources */ = {isa = PBXBuildFile; fileRef = 76B5421A194FA22D009495D5 /* colorCube_moody.png */; };
32 | 76B54222194FF3A2009495D5 /* colorCube_chrome.png in Resources */ = {isa = PBXBuildFile; fileRef = 76B54221194FF3A2009495D5 /* colorCube_chrome.png */; };
33 | 76B54224194FF42D009495D5 /* colorCube_posterize.png in Resources */ = {isa = PBXBuildFile; fileRef = 76B54223194FF42D009495D5 /* colorCube_posterize.png */; };
34 | /* End PBXBuildFile section */
35 |
36 | /* Begin PBXContainerItemProxy section */
37 | 7672F158194DE3E000BAAE5A /* PBXContainerItemProxy */ = {
38 | isa = PBXContainerItemProxy;
39 | containerPortal = 7672F139194DE3E000BAAE5A /* Project object */;
40 | proxyType = 1;
41 | remoteGlobalIDString = 7672F140194DE3E000BAAE5A;
42 | remoteInfo = InstaCubeExample;
43 | };
44 | 7672F178194DE3F800BAAE5A /* PBXContainerItemProxy */ = {
45 | isa = PBXContainerItemProxy;
46 | containerPortal = 7672F139194DE3E000BAAE5A /* Project object */;
47 | proxyType = 1;
48 | remoteGlobalIDString = 7672F16B194DE3F800BAAE5A;
49 | remoteInfo = InstaCube;
50 | };
51 | 7672F17F194DE3F800BAAE5A /* PBXContainerItemProxy */ = {
52 | isa = PBXContainerItemProxy;
53 | containerPortal = 7672F139194DE3E000BAAE5A /* Project object */;
54 | proxyType = 1;
55 | remoteGlobalIDString = 7672F16B194DE3F800BAAE5A;
56 | remoteInfo = InstaCube;
57 | };
58 | 7672F183194DE3F800BAAE5A /* PBXContainerItemProxy */ = {
59 | isa = PBXContainerItemProxy;
60 | containerPortal = 7672F139194DE3E000BAAE5A /* Project object */;
61 | proxyType = 1;
62 | remoteGlobalIDString = 7672F16B194DE3F800BAAE5A;
63 | remoteInfo = InstaCube;
64 | };
65 | 7672F18C194DE3F900BAAE5A /* PBXContainerItemProxy */ = {
66 | isa = PBXContainerItemProxy;
67 | containerPortal = 7672F139194DE3E000BAAE5A /* Project object */;
68 | proxyType = 1;
69 | remoteGlobalIDString = 7672F16B194DE3F800BAAE5A;
70 | remoteInfo = InstaCube;
71 | };
72 | /* End PBXContainerItemProxy section */
73 |
74 | /* Begin PBXCopyFilesBuildPhase section */
75 | 7672F188194DE3F800BAAE5A /* Embed Frameworks */ = {
76 | isa = PBXCopyFilesBuildPhase;
77 | buildActionMask = 2147483647;
78 | dstPath = "";
79 | dstSubfolderSpec = 10;
80 | files = (
81 | 7672F182194DE3F800BAAE5A /* InstaCube.framework in Embed Frameworks */,
82 | );
83 | name = "Embed Frameworks";
84 | runOnlyForDeploymentPostprocessing = 0;
85 | };
86 | /* End PBXCopyFilesBuildPhase section */
87 |
88 | /* Begin PBXFileReference section */
89 | 7627499A195A432800688499 /* colorCube_inverse.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_inverse.png; sourceTree = ""; };
90 | 7672F141194DE3E000BAAE5A /* InstaCubeExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InstaCubeExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
91 | 7672F145194DE3E000BAAE5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
92 | 7672F146194DE3E000BAAE5A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
93 | 7672F148194DE3E000BAAE5A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
94 | 7672F149194DE3E000BAAE5A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
95 | 7672F14F194DE3E000BAAE5A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
96 | 7672F151194DE3E000BAAE5A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
97 | 7672F157194DE3E000BAAE5A /* InstaCubeExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstaCubeExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
98 | 7672F15C194DE3E000BAAE5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
99 | 7672F15D194DE3E000BAAE5A /* InstaCubeExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstaCubeExampleTests.m; sourceTree = ""; };
100 | 7672F16C194DE3F800BAAE5A /* InstaCube.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = InstaCube.framework; sourceTree = BUILT_PRODUCTS_DIR; };
101 | 7672F16F194DE3F800BAAE5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
102 | 7672F170194DE3F800BAAE5A /* InstaCube.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstaCube.h; sourceTree = ""; };
103 | 7672F176194DE3F800BAAE5A /* InstaCubeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstaCubeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
104 | 7672F17C194DE3F800BAAE5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
105 | 7672F17D194DE3F800BAAE5A /* InstaCubeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstaCubeTests.m; sourceTree = ""; };
106 | 7672F19A194DE82F00BAAE5A /* InstaCubeExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "InstaCubeExample-Bridging-Header.h"; sourceTree = ""; };
107 | 7672F19B194DE83000BAAE5A /* ColorCubeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorCubeViewController.swift; sourceTree = ""; };
108 | 7672F19D194DE9F800BAAE5A /* InstaCubeGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstaCubeGenerator.h; sourceTree = ""; };
109 | 7672F19E194DE9F800BAAE5A /* InstaCubeGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaCubeGenerator.m; sourceTree = ""; };
110 | 7672F1CD194DF63000BAAE5A /* colorCube_vibrance.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_vibrance.png; sourceTree = ""; };
111 | 7672F1CE194DF63000BAAE5A /* colorCube_threshold.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_threshold.png; sourceTree = ""; };
112 | 7672F1CF194DF63000BAAE5A /* colorCube_solarize.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_solarize.png; sourceTree = ""; };
113 | 7672F1D3194DF76C00BAAE5A /* example.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = example.png; sourceTree = ""; };
114 | 76B54216194FA0C2009495D5 /* colorCube_warming.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_warming.png; sourceTree = ""; };
115 | 76B54217194FA0C2009495D5 /* colorCube_green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_green.png; sourceTree = ""; };
116 | 76B5421A194FA22D009495D5 /* colorCube_moody.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_moody.png; sourceTree = ""; };
117 | 76B54221194FF3A2009495D5 /* colorCube_chrome.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_chrome.png; sourceTree = ""; };
118 | 76B54223194FF42D009495D5 /* colorCube_posterize.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colorCube_posterize.png; sourceTree = ""; };
119 | /* End PBXFileReference section */
120 |
121 | /* Begin PBXFrameworksBuildPhase section */
122 | 7672F13E194DE3E000BAAE5A /* Frameworks */ = {
123 | isa = PBXFrameworksBuildPhase;
124 | buildActionMask = 2147483647;
125 | files = (
126 | 7672F181194DE3F800BAAE5A /* InstaCube.framework in Frameworks */,
127 | );
128 | runOnlyForDeploymentPostprocessing = 0;
129 | };
130 | 7672F154194DE3E000BAAE5A /* Frameworks */ = {
131 | isa = PBXFrameworksBuildPhase;
132 | buildActionMask = 2147483647;
133 | files = (
134 | );
135 | runOnlyForDeploymentPostprocessing = 0;
136 | };
137 | 7672F168194DE3F800BAAE5A /* Frameworks */ = {
138 | isa = PBXFrameworksBuildPhase;
139 | buildActionMask = 2147483647;
140 | files = (
141 | );
142 | runOnlyForDeploymentPostprocessing = 0;
143 | };
144 | 7672F173194DE3F800BAAE5A /* Frameworks */ = {
145 | isa = PBXFrameworksBuildPhase;
146 | buildActionMask = 2147483647;
147 | files = (
148 | 7672F177194DE3F800BAAE5A /* InstaCube.framework in Frameworks */,
149 | );
150 | runOnlyForDeploymentPostprocessing = 0;
151 | };
152 | /* End PBXFrameworksBuildPhase section */
153 |
154 | /* Begin PBXGroup section */
155 | 7672F138194DE3E000BAAE5A = {
156 | isa = PBXGroup;
157 | children = (
158 | 7672F143194DE3E000BAAE5A /* InstaCubeExample */,
159 | 7672F15A194DE3E000BAAE5A /* InstaCubeExampleTests */,
160 | 7672F16D194DE3F800BAAE5A /* InstaCube */,
161 | 7672F17A194DE3F800BAAE5A /* InstaCubeTests */,
162 | 7672F142194DE3E000BAAE5A /* Products */,
163 | );
164 | sourceTree = "";
165 | };
166 | 7672F142194DE3E000BAAE5A /* Products */ = {
167 | isa = PBXGroup;
168 | children = (
169 | 7672F141194DE3E000BAAE5A /* InstaCubeExample.app */,
170 | 7672F157194DE3E000BAAE5A /* InstaCubeExampleTests.xctest */,
171 | 7672F16C194DE3F800BAAE5A /* InstaCube.framework */,
172 | 7672F176194DE3F800BAAE5A /* InstaCubeTests.xctest */,
173 | );
174 | name = Products;
175 | sourceTree = "";
176 | };
177 | 7672F143194DE3E000BAAE5A /* InstaCubeExample */ = {
178 | isa = PBXGroup;
179 | children = (
180 | 7672F1CC194DF62300BAAE5A /* Cubes */,
181 | 7672F148194DE3E000BAAE5A /* AppDelegate.h */,
182 | 7672F149194DE3E000BAAE5A /* AppDelegate.m */,
183 | 7672F19B194DE83000BAAE5A /* ColorCubeViewController.swift */,
184 | 7672F14E194DE3E000BAAE5A /* Main.storyboard */,
185 | 7672F1D3194DF76C00BAAE5A /* example.png */,
186 | 7672F151194DE3E000BAAE5A /* Images.xcassets */,
187 | 7672F144194DE3E000BAAE5A /* Supporting Files */,
188 | 7672F19A194DE82F00BAAE5A /* InstaCubeExample-Bridging-Header.h */,
189 | );
190 | path = InstaCubeExample;
191 | sourceTree = "";
192 | };
193 | 7672F144194DE3E000BAAE5A /* Supporting Files */ = {
194 | isa = PBXGroup;
195 | children = (
196 | 7672F145194DE3E000BAAE5A /* Info.plist */,
197 | 7672F146194DE3E000BAAE5A /* main.m */,
198 | );
199 | name = "Supporting Files";
200 | sourceTree = "";
201 | };
202 | 7672F15A194DE3E000BAAE5A /* InstaCubeExampleTests */ = {
203 | isa = PBXGroup;
204 | children = (
205 | 7672F15D194DE3E000BAAE5A /* InstaCubeExampleTests.m */,
206 | 7672F15B194DE3E000BAAE5A /* Supporting Files */,
207 | );
208 | path = InstaCubeExampleTests;
209 | sourceTree = "";
210 | };
211 | 7672F15B194DE3E000BAAE5A /* Supporting Files */ = {
212 | isa = PBXGroup;
213 | children = (
214 | 7672F15C194DE3E000BAAE5A /* Info.plist */,
215 | );
216 | name = "Supporting Files";
217 | sourceTree = "";
218 | };
219 | 7672F16D194DE3F800BAAE5A /* InstaCube */ = {
220 | isa = PBXGroup;
221 | children = (
222 | 7672F170194DE3F800BAAE5A /* InstaCube.h */,
223 | 7672F19D194DE9F800BAAE5A /* InstaCubeGenerator.h */,
224 | 7672F19E194DE9F800BAAE5A /* InstaCubeGenerator.m */,
225 | 7672F16E194DE3F800BAAE5A /* Supporting Files */,
226 | );
227 | path = InstaCube;
228 | sourceTree = "";
229 | };
230 | 7672F16E194DE3F800BAAE5A /* Supporting Files */ = {
231 | isa = PBXGroup;
232 | children = (
233 | 7672F16F194DE3F800BAAE5A /* Info.plist */,
234 | );
235 | name = "Supporting Files";
236 | sourceTree = "";
237 | };
238 | 7672F17A194DE3F800BAAE5A /* InstaCubeTests */ = {
239 | isa = PBXGroup;
240 | children = (
241 | 7672F17D194DE3F800BAAE5A /* InstaCubeTests.m */,
242 | 7672F17B194DE3F800BAAE5A /* Supporting Files */,
243 | );
244 | path = InstaCubeTests;
245 | sourceTree = "";
246 | };
247 | 7672F17B194DE3F800BAAE5A /* Supporting Files */ = {
248 | isa = PBXGroup;
249 | children = (
250 | 7672F17C194DE3F800BAAE5A /* Info.plist */,
251 | );
252 | name = "Supporting Files";
253 | sourceTree = "";
254 | };
255 | 7672F1CC194DF62300BAAE5A /* Cubes */ = {
256 | isa = PBXGroup;
257 | children = (
258 | 7627499A195A432800688499 /* colorCube_inverse.png */,
259 | 76B54221194FF3A2009495D5 /* colorCube_chrome.png */,
260 | 7672F1CD194DF63000BAAE5A /* colorCube_vibrance.png */,
261 | 7672F1CE194DF63000BAAE5A /* colorCube_threshold.png */,
262 | 7672F1CF194DF63000BAAE5A /* colorCube_solarize.png */,
263 | 76B54216194FA0C2009495D5 /* colorCube_warming.png */,
264 | 76B54217194FA0C2009495D5 /* colorCube_green.png */,
265 | 76B5421A194FA22D009495D5 /* colorCube_moody.png */,
266 | 76B54223194FF42D009495D5 /* colorCube_posterize.png */,
267 | );
268 | name = Cubes;
269 | sourceTree = "";
270 | };
271 | /* End PBXGroup section */
272 |
273 | /* Begin PBXHeadersBuildPhase section */
274 | 7672F169194DE3F800BAAE5A /* Headers */ = {
275 | isa = PBXHeadersBuildPhase;
276 | buildActionMask = 2147483647;
277 | files = (
278 | 7672F171194DE3F800BAAE5A /* InstaCube.h in Headers */,
279 | 7672F19F194DE9F800BAAE5A /* InstaCubeGenerator.h in Headers */,
280 | );
281 | runOnlyForDeploymentPostprocessing = 0;
282 | };
283 | /* End PBXHeadersBuildPhase section */
284 |
285 | /* Begin PBXNativeTarget section */
286 | 7672F140194DE3E000BAAE5A /* InstaCubeExample */ = {
287 | isa = PBXNativeTarget;
288 | buildConfigurationList = 7672F161194DE3E000BAAE5A /* Build configuration list for PBXNativeTarget "InstaCubeExample" */;
289 | buildPhases = (
290 | 7672F13D194DE3E000BAAE5A /* Sources */,
291 | 7672F13E194DE3E000BAAE5A /* Frameworks */,
292 | 7672F13F194DE3E000BAAE5A /* Resources */,
293 | 7672F188194DE3F800BAAE5A /* Embed Frameworks */,
294 | );
295 | buildRules = (
296 | );
297 | dependencies = (
298 | 7672F180194DE3F800BAAE5A /* PBXTargetDependency */,
299 | 7672F184194DE3F800BAAE5A /* PBXTargetDependency */,
300 | );
301 | name = InstaCubeExample;
302 | productName = InstaCubeExample;
303 | productReference = 7672F141194DE3E000BAAE5A /* InstaCubeExample.app */;
304 | productType = "com.apple.product-type.application";
305 | };
306 | 7672F156194DE3E000BAAE5A /* InstaCubeExampleTests */ = {
307 | isa = PBXNativeTarget;
308 | buildConfigurationList = 7672F164194DE3E000BAAE5A /* Build configuration list for PBXNativeTarget "InstaCubeExampleTests" */;
309 | buildPhases = (
310 | 7672F153194DE3E000BAAE5A /* Sources */,
311 | 7672F154194DE3E000BAAE5A /* Frameworks */,
312 | 7672F155194DE3E000BAAE5A /* Resources */,
313 | );
314 | buildRules = (
315 | );
316 | dependencies = (
317 | 7672F159194DE3E000BAAE5A /* PBXTargetDependency */,
318 | );
319 | name = InstaCubeExampleTests;
320 | productName = InstaCubeExampleTests;
321 | productReference = 7672F157194DE3E000BAAE5A /* InstaCubeExampleTests.xctest */;
322 | productType = "com.apple.product-type.bundle.unit-test";
323 | };
324 | 7672F16B194DE3F800BAAE5A /* InstaCube */ = {
325 | isa = PBXNativeTarget;
326 | buildConfigurationList = 7672F185194DE3F800BAAE5A /* Build configuration list for PBXNativeTarget "InstaCube" */;
327 | buildPhases = (
328 | 7672F167194DE3F800BAAE5A /* Sources */,
329 | 7672F168194DE3F800BAAE5A /* Frameworks */,
330 | 7672F169194DE3F800BAAE5A /* Headers */,
331 | 7672F16A194DE3F800BAAE5A /* Resources */,
332 | );
333 | buildRules = (
334 | );
335 | dependencies = (
336 | );
337 | name = InstaCube;
338 | productName = InstaCube;
339 | productReference = 7672F16C194DE3F800BAAE5A /* InstaCube.framework */;
340 | productType = "com.apple.product-type.framework";
341 | };
342 | 7672F175194DE3F800BAAE5A /* InstaCubeTests */ = {
343 | isa = PBXNativeTarget;
344 | buildConfigurationList = 7672F189194DE3F800BAAE5A /* Build configuration list for PBXNativeTarget "InstaCubeTests" */;
345 | buildPhases = (
346 | 7672F172194DE3F800BAAE5A /* Sources */,
347 | 7672F173194DE3F800BAAE5A /* Frameworks */,
348 | 7672F174194DE3F800BAAE5A /* Resources */,
349 | );
350 | buildRules = (
351 | );
352 | dependencies = (
353 | 7672F179194DE3F800BAAE5A /* PBXTargetDependency */,
354 | 7672F18D194DE3F900BAAE5A /* PBXTargetDependency */,
355 | );
356 | name = InstaCubeTests;
357 | productName = InstaCubeTests;
358 | productReference = 7672F176194DE3F800BAAE5A /* InstaCubeTests.xctest */;
359 | productType = "com.apple.product-type.bundle.unit-test";
360 | };
361 | /* End PBXNativeTarget section */
362 |
363 | /* Begin PBXProject section */
364 | 7672F139194DE3E000BAAE5A /* Project object */ = {
365 | isa = PBXProject;
366 | attributes = {
367 | LastUpgradeCheck = 0600;
368 | ORGANIZATIONNAME = sushiGrass;
369 | TargetAttributes = {
370 | 7672F140194DE3E000BAAE5A = {
371 | CreatedOnToolsVersion = 6.0;
372 | };
373 | 7672F156194DE3E000BAAE5A = {
374 | CreatedOnToolsVersion = 6.0;
375 | TestTargetID = 7672F140194DE3E000BAAE5A;
376 | };
377 | 7672F16B194DE3F800BAAE5A = {
378 | CreatedOnToolsVersion = 6.0;
379 | };
380 | 7672F175194DE3F800BAAE5A = {
381 | CreatedOnToolsVersion = 6.0;
382 | TestTargetID = 7672F16B194DE3F800BAAE5A;
383 | };
384 | };
385 | };
386 | buildConfigurationList = 7672F13C194DE3E000BAAE5A /* Build configuration list for PBXProject "InstaCubeExample" */;
387 | compatibilityVersion = "Xcode 3.2";
388 | developmentRegion = English;
389 | hasScannedForEncodings = 0;
390 | knownRegions = (
391 | en,
392 | Base,
393 | );
394 | mainGroup = 7672F138194DE3E000BAAE5A;
395 | productRefGroup = 7672F142194DE3E000BAAE5A /* Products */;
396 | projectDirPath = "";
397 | projectRoot = "";
398 | targets = (
399 | 7672F140194DE3E000BAAE5A /* InstaCubeExample */,
400 | 7672F156194DE3E000BAAE5A /* InstaCubeExampleTests */,
401 | 7672F16B194DE3F800BAAE5A /* InstaCube */,
402 | 7672F175194DE3F800BAAE5A /* InstaCubeTests */,
403 | );
404 | };
405 | /* End PBXProject section */
406 |
407 | /* Begin PBXResourcesBuildPhase section */
408 | 7672F13F194DE3E000BAAE5A /* Resources */ = {
409 | isa = PBXResourcesBuildPhase;
410 | buildActionMask = 2147483647;
411 | files = (
412 | 7672F1D4194DF76C00BAAE5A /* example.png in Resources */,
413 | 7672F1D1194DF63000BAAE5A /* colorCube_threshold.png in Resources */,
414 | 76B54222194FF3A2009495D5 /* colorCube_chrome.png in Resources */,
415 | 7672F1D0194DF63000BAAE5A /* colorCube_vibrance.png in Resources */,
416 | 7672F150194DE3E000BAAE5A /* Main.storyboard in Resources */,
417 | 7627499B195A432800688499 /* colorCube_inverse.png in Resources */,
418 | 76B54219194FA0C2009495D5 /* colorCube_green.png in Resources */,
419 | 76B5421B194FA22D009495D5 /* colorCube_moody.png in Resources */,
420 | 7672F152194DE3E000BAAE5A /* Images.xcassets in Resources */,
421 | 76B54224194FF42D009495D5 /* colorCube_posterize.png in Resources */,
422 | 7672F1D2194DF63000BAAE5A /* colorCube_solarize.png in Resources */,
423 | 76B54218194FA0C2009495D5 /* colorCube_warming.png in Resources */,
424 | );
425 | runOnlyForDeploymentPostprocessing = 0;
426 | };
427 | 7672F155194DE3E000BAAE5A /* Resources */ = {
428 | isa = PBXResourcesBuildPhase;
429 | buildActionMask = 2147483647;
430 | files = (
431 | );
432 | runOnlyForDeploymentPostprocessing = 0;
433 | };
434 | 7672F16A194DE3F800BAAE5A /* Resources */ = {
435 | isa = PBXResourcesBuildPhase;
436 | buildActionMask = 2147483647;
437 | files = (
438 | );
439 | runOnlyForDeploymentPostprocessing = 0;
440 | };
441 | 7672F174194DE3F800BAAE5A /* Resources */ = {
442 | isa = PBXResourcesBuildPhase;
443 | buildActionMask = 2147483647;
444 | files = (
445 | 76B54220194FE550009495D5 /* colorCube_moody.png in Resources */,
446 | );
447 | runOnlyForDeploymentPostprocessing = 0;
448 | };
449 | /* End PBXResourcesBuildPhase section */
450 |
451 | /* Begin PBXSourcesBuildPhase section */
452 | 7672F13D194DE3E000BAAE5A /* Sources */ = {
453 | isa = PBXSourcesBuildPhase;
454 | buildActionMask = 2147483647;
455 | files = (
456 | 7672F19C194DE83000BAAE5A /* ColorCubeViewController.swift in Sources */,
457 | 7672F14A194DE3E000BAAE5A /* AppDelegate.m in Sources */,
458 | 7672F147194DE3E000BAAE5A /* main.m in Sources */,
459 | );
460 | runOnlyForDeploymentPostprocessing = 0;
461 | };
462 | 7672F153194DE3E000BAAE5A /* Sources */ = {
463 | isa = PBXSourcesBuildPhase;
464 | buildActionMask = 2147483647;
465 | files = (
466 | 7672F15E194DE3E000BAAE5A /* InstaCubeExampleTests.m in Sources */,
467 | );
468 | runOnlyForDeploymentPostprocessing = 0;
469 | };
470 | 7672F167194DE3F800BAAE5A /* Sources */ = {
471 | isa = PBXSourcesBuildPhase;
472 | buildActionMask = 2147483647;
473 | files = (
474 | 7672F1A0194DE9F800BAAE5A /* InstaCubeGenerator.m in Sources */,
475 | );
476 | runOnlyForDeploymentPostprocessing = 0;
477 | };
478 | 7672F172194DE3F800BAAE5A /* Sources */ = {
479 | isa = PBXSourcesBuildPhase;
480 | buildActionMask = 2147483647;
481 | files = (
482 | 7672F17E194DE3F800BAAE5A /* InstaCubeTests.m in Sources */,
483 | );
484 | runOnlyForDeploymentPostprocessing = 0;
485 | };
486 | /* End PBXSourcesBuildPhase section */
487 |
488 | /* Begin PBXTargetDependency section */
489 | 7672F159194DE3E000BAAE5A /* PBXTargetDependency */ = {
490 | isa = PBXTargetDependency;
491 | target = 7672F140194DE3E000BAAE5A /* InstaCubeExample */;
492 | targetProxy = 7672F158194DE3E000BAAE5A /* PBXContainerItemProxy */;
493 | };
494 | 7672F179194DE3F800BAAE5A /* PBXTargetDependency */ = {
495 | isa = PBXTargetDependency;
496 | target = 7672F16B194DE3F800BAAE5A /* InstaCube */;
497 | targetProxy = 7672F178194DE3F800BAAE5A /* PBXContainerItemProxy */;
498 | };
499 | 7672F180194DE3F800BAAE5A /* PBXTargetDependency */ = {
500 | isa = PBXTargetDependency;
501 | target = 7672F16B194DE3F800BAAE5A /* InstaCube */;
502 | targetProxy = 7672F17F194DE3F800BAAE5A /* PBXContainerItemProxy */;
503 | };
504 | 7672F184194DE3F800BAAE5A /* PBXTargetDependency */ = {
505 | isa = PBXTargetDependency;
506 | target = 7672F16B194DE3F800BAAE5A /* InstaCube */;
507 | targetProxy = 7672F183194DE3F800BAAE5A /* PBXContainerItemProxy */;
508 | };
509 | 7672F18D194DE3F900BAAE5A /* PBXTargetDependency */ = {
510 | isa = PBXTargetDependency;
511 | target = 7672F16B194DE3F800BAAE5A /* InstaCube */;
512 | targetProxy = 7672F18C194DE3F900BAAE5A /* PBXContainerItemProxy */;
513 | };
514 | /* End PBXTargetDependency section */
515 |
516 | /* Begin PBXVariantGroup section */
517 | 7672F14E194DE3E000BAAE5A /* Main.storyboard */ = {
518 | isa = PBXVariantGroup;
519 | children = (
520 | 7672F14F194DE3E000BAAE5A /* Base */,
521 | );
522 | name = Main.storyboard;
523 | sourceTree = "";
524 | };
525 | /* End PBXVariantGroup section */
526 |
527 | /* Begin XCBuildConfiguration section */
528 | 7672F15F194DE3E000BAAE5A /* Debug */ = {
529 | isa = XCBuildConfiguration;
530 | buildSettings = {
531 | ALWAYS_SEARCH_USER_PATHS = NO;
532 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
533 | CLANG_CXX_LIBRARY = "libc++";
534 | CLANG_ENABLE_MODULES = YES;
535 | CLANG_ENABLE_OBJC_ARC = YES;
536 | CLANG_WARN_BOOL_CONVERSION = YES;
537 | CLANG_WARN_CONSTANT_CONVERSION = YES;
538 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
539 | CLANG_WARN_EMPTY_BODY = YES;
540 | CLANG_WARN_ENUM_CONVERSION = YES;
541 | CLANG_WARN_INT_CONVERSION = YES;
542 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
543 | CLANG_WARN_UNREACHABLE_CODE = YES;
544 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
545 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
546 | COPY_PHASE_STRIP = NO;
547 | ENABLE_STRICT_OBJC_MSGSEND = YES;
548 | GCC_C_LANGUAGE_STANDARD = gnu99;
549 | GCC_DYNAMIC_NO_PIC = NO;
550 | GCC_OPTIMIZATION_LEVEL = 0;
551 | GCC_PREPROCESSOR_DEFINITIONS = (
552 | "DEBUG=1",
553 | "$(inherited)",
554 | );
555 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
556 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
557 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
558 | GCC_WARN_UNDECLARED_SELECTOR = YES;
559 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
560 | GCC_WARN_UNUSED_FUNCTION = YES;
561 | GCC_WARN_UNUSED_VARIABLE = YES;
562 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
563 | METAL_ENABLE_DEBUG_INFO = YES;
564 | ONLY_ACTIVE_ARCH = YES;
565 | SDKROOT = iphoneos;
566 | };
567 | name = Debug;
568 | };
569 | 7672F160194DE3E000BAAE5A /* Release */ = {
570 | isa = XCBuildConfiguration;
571 | buildSettings = {
572 | ALWAYS_SEARCH_USER_PATHS = NO;
573 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
574 | CLANG_CXX_LIBRARY = "libc++";
575 | CLANG_ENABLE_MODULES = YES;
576 | CLANG_ENABLE_OBJC_ARC = YES;
577 | CLANG_WARN_BOOL_CONVERSION = YES;
578 | CLANG_WARN_CONSTANT_CONVERSION = YES;
579 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
580 | CLANG_WARN_EMPTY_BODY = YES;
581 | CLANG_WARN_ENUM_CONVERSION = YES;
582 | CLANG_WARN_INT_CONVERSION = YES;
583 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
584 | CLANG_WARN_UNREACHABLE_CODE = YES;
585 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
586 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
587 | COPY_PHASE_STRIP = YES;
588 | ENABLE_NS_ASSERTIONS = NO;
589 | ENABLE_STRICT_OBJC_MSGSEND = YES;
590 | GCC_C_LANGUAGE_STANDARD = gnu99;
591 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
592 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
593 | GCC_WARN_UNDECLARED_SELECTOR = YES;
594 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
595 | GCC_WARN_UNUSED_FUNCTION = YES;
596 | GCC_WARN_UNUSED_VARIABLE = YES;
597 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
598 | METAL_ENABLE_DEBUG_INFO = NO;
599 | SDKROOT = iphoneos;
600 | VALIDATE_PRODUCT = YES;
601 | };
602 | name = Release;
603 | };
604 | 7672F162194DE3E000BAAE5A /* Debug */ = {
605 | isa = XCBuildConfiguration;
606 | buildSettings = {
607 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
608 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
609 | CLANG_ENABLE_MODULES = YES;
610 | INFOPLIST_FILE = InstaCubeExample/Info.plist;
611 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
612 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
613 | PRODUCT_NAME = "$(TARGET_NAME)";
614 | SWIFT_OBJC_BRIDGING_HEADER = "InstaCubeExample/InstaCubeExample-Bridging-Header.h";
615 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
616 | TARGETED_DEVICE_FAMILY = 1;
617 | };
618 | name = Debug;
619 | };
620 | 7672F163194DE3E000BAAE5A /* Release */ = {
621 | isa = XCBuildConfiguration;
622 | buildSettings = {
623 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
624 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
625 | CLANG_ENABLE_MODULES = YES;
626 | INFOPLIST_FILE = InstaCubeExample/Info.plist;
627 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
628 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
629 | PRODUCT_NAME = "$(TARGET_NAME)";
630 | SWIFT_OBJC_BRIDGING_HEADER = "InstaCubeExample/InstaCubeExample-Bridging-Header.h";
631 | TARGETED_DEVICE_FAMILY = 1;
632 | };
633 | name = Release;
634 | };
635 | 7672F165194DE3E000BAAE5A /* Debug */ = {
636 | isa = XCBuildConfiguration;
637 | buildSettings = {
638 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/InstaCubeExample.app/InstaCubeExample";
639 | FRAMEWORK_SEARCH_PATHS = (
640 | "$(SDKROOT)/Developer/Library/Frameworks",
641 | "$(inherited)",
642 | );
643 | GCC_PREPROCESSOR_DEFINITIONS = (
644 | "DEBUG=1",
645 | "$(inherited)",
646 | );
647 | INFOPLIST_FILE = InstaCubeExampleTests/Info.plist;
648 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
649 | METAL_ENABLE_DEBUG_INFO = YES;
650 | PRODUCT_NAME = "$(TARGET_NAME)";
651 | TEST_HOST = "$(BUNDLE_LOADER)";
652 | };
653 | name = Debug;
654 | };
655 | 7672F166194DE3E000BAAE5A /* Release */ = {
656 | isa = XCBuildConfiguration;
657 | buildSettings = {
658 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/InstaCubeExample.app/InstaCubeExample";
659 | FRAMEWORK_SEARCH_PATHS = (
660 | "$(SDKROOT)/Developer/Library/Frameworks",
661 | "$(inherited)",
662 | );
663 | INFOPLIST_FILE = InstaCubeExampleTests/Info.plist;
664 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
665 | METAL_ENABLE_DEBUG_INFO = NO;
666 | PRODUCT_NAME = "$(TARGET_NAME)";
667 | TEST_HOST = "$(BUNDLE_LOADER)";
668 | };
669 | name = Release;
670 | };
671 | 7672F186194DE3F800BAAE5A /* Debug */ = {
672 | isa = XCBuildConfiguration;
673 | buildSettings = {
674 | CURRENT_PROJECT_VERSION = 1;
675 | DEFINES_MODULE = YES;
676 | DYLIB_COMPATIBILITY_VERSION = 1;
677 | DYLIB_CURRENT_VERSION = 1;
678 | DYLIB_INSTALL_NAME_BASE = "@rpath";
679 | GCC_PREPROCESSOR_DEFINITIONS = (
680 | "DEBUG=1",
681 | "$(inherited)",
682 | );
683 | INFOPLIST_FILE = InstaCube/Info.plist;
684 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
685 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
686 | METAL_ENABLE_DEBUG_INFO = YES;
687 | PRODUCT_NAME = "$(TARGET_NAME)";
688 | SKIP_INSTALL = YES;
689 | TARGETED_DEVICE_FAMILY = "1,2";
690 | VERSIONING_SYSTEM = "apple-generic";
691 | VERSION_INFO_PREFIX = "";
692 | };
693 | name = Debug;
694 | };
695 | 7672F187194DE3F800BAAE5A /* Release */ = {
696 | isa = XCBuildConfiguration;
697 | buildSettings = {
698 | CURRENT_PROJECT_VERSION = 1;
699 | DEFINES_MODULE = YES;
700 | DYLIB_COMPATIBILITY_VERSION = 1;
701 | DYLIB_CURRENT_VERSION = 1;
702 | DYLIB_INSTALL_NAME_BASE = "@rpath";
703 | INFOPLIST_FILE = InstaCube/Info.plist;
704 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
705 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
706 | METAL_ENABLE_DEBUG_INFO = NO;
707 | PRODUCT_NAME = "$(TARGET_NAME)";
708 | SKIP_INSTALL = YES;
709 | TARGETED_DEVICE_FAMILY = "1,2";
710 | VERSIONING_SYSTEM = "apple-generic";
711 | VERSION_INFO_PREFIX = "";
712 | };
713 | name = Release;
714 | };
715 | 7672F18A194DE3F800BAAE5A /* Debug */ = {
716 | isa = XCBuildConfiguration;
717 | buildSettings = {
718 | FRAMEWORK_SEARCH_PATHS = (
719 | "$(SDKROOT)/Developer/Library/Frameworks",
720 | "$(inherited)",
721 | );
722 | GCC_PREPROCESSOR_DEFINITIONS = (
723 | "DEBUG=1",
724 | "$(inherited)",
725 | );
726 | INFOPLIST_FILE = InstaCubeTests/Info.plist;
727 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
728 | METAL_ENABLE_DEBUG_INFO = YES;
729 | PRODUCT_NAME = "$(TARGET_NAME)";
730 | };
731 | name = Debug;
732 | };
733 | 7672F18B194DE3F800BAAE5A /* Release */ = {
734 | isa = XCBuildConfiguration;
735 | buildSettings = {
736 | FRAMEWORK_SEARCH_PATHS = (
737 | "$(SDKROOT)/Developer/Library/Frameworks",
738 | "$(inherited)",
739 | );
740 | INFOPLIST_FILE = InstaCubeTests/Info.plist;
741 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
742 | METAL_ENABLE_DEBUG_INFO = NO;
743 | PRODUCT_NAME = "$(TARGET_NAME)";
744 | };
745 | name = Release;
746 | };
747 | /* End XCBuildConfiguration section */
748 |
749 | /* Begin XCConfigurationList section */
750 | 7672F13C194DE3E000BAAE5A /* Build configuration list for PBXProject "InstaCubeExample" */ = {
751 | isa = XCConfigurationList;
752 | buildConfigurations = (
753 | 7672F15F194DE3E000BAAE5A /* Debug */,
754 | 7672F160194DE3E000BAAE5A /* Release */,
755 | );
756 | defaultConfigurationIsVisible = 0;
757 | defaultConfigurationName = Release;
758 | };
759 | 7672F161194DE3E000BAAE5A /* Build configuration list for PBXNativeTarget "InstaCubeExample" */ = {
760 | isa = XCConfigurationList;
761 | buildConfigurations = (
762 | 7672F162194DE3E000BAAE5A /* Debug */,
763 | 7672F163194DE3E000BAAE5A /* Release */,
764 | );
765 | defaultConfigurationIsVisible = 0;
766 | defaultConfigurationName = Release;
767 | };
768 | 7672F164194DE3E000BAAE5A /* Build configuration list for PBXNativeTarget "InstaCubeExampleTests" */ = {
769 | isa = XCConfigurationList;
770 | buildConfigurations = (
771 | 7672F165194DE3E000BAAE5A /* Debug */,
772 | 7672F166194DE3E000BAAE5A /* Release */,
773 | );
774 | defaultConfigurationIsVisible = 0;
775 | defaultConfigurationName = Release;
776 | };
777 | 7672F185194DE3F800BAAE5A /* Build configuration list for PBXNativeTarget "InstaCube" */ = {
778 | isa = XCConfigurationList;
779 | buildConfigurations = (
780 | 7672F186194DE3F800BAAE5A /* Debug */,
781 | 7672F187194DE3F800BAAE5A /* Release */,
782 | );
783 | defaultConfigurationIsVisible = 0;
784 | defaultConfigurationName = Release;
785 | };
786 | 7672F189194DE3F800BAAE5A /* Build configuration list for PBXNativeTarget "InstaCubeTests" */ = {
787 | isa = XCConfigurationList;
788 | buildConfigurations = (
789 | 7672F18A194DE3F800BAAE5A /* Debug */,
790 | 7672F18B194DE3F800BAAE5A /* Release */,
791 | );
792 | defaultConfigurationIsVisible = 0;
793 | defaultConfigurationName = Release;
794 | };
795 | /* End XCConfigurationList section */
796 | };
797 | rootObject = 7672F139194DE3E000BAAE5A /* Project object */;
798 | }
799 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample.xcodeproj/xcshareddata/xcbaselines/7672F175194DE3F800BAAE5A.xcbaseline/DD57F4EF-15FA-4AE9-867B-1ECC8BE83EAD.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | classNames
6 |
7 | InstaCubeTests
8 |
9 | testInstaCubeWithImage
10 |
11 | com.apple.XCTPerformanceMetric_WallClockTime
12 |
13 | baselineAverage
14 | 0.0
15 | baselineIntegrationDisplayName
16 | Local Baseline
17 | maxPercentRelativeStandardDeviation
18 | 10
19 |
20 |
21 | testInstaCubeWithImageName
22 |
23 | com.apple.XCTPerformanceMetric_WallClockTime
24 |
25 | baselineAverage
26 | 0.0
27 | baselineIntegrationDisplayName
28 | Local Baseline
29 | maxPercentRelativeStandardDeviation
30 | 10
31 |
32 |
33 |
34 |
35 | performanceMetricIdentifiers
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample.xcodeproj/xcshareddata/xcbaselines/7672F175194DE3F800BAAE5A.xcbaseline/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | runDestinationsByUUID
6 |
7 | DD57F4EF-15FA-4AE9-867B-1ECC8BE83EAD
8 |
9 | localComputer
10 |
11 | busSpeedInMHz
12 | 100
13 | cpuCount
14 | 1
15 | cpuKind
16 | Intel Core i7
17 | cpuSpeedInMHz
18 | 1700
19 | logicalCPUCoresPerPackage
20 | 4
21 | modelCode
22 | MacBookAir6,1
23 | operatingSystemVersion
24 | 10.9.3
25 | physicalCPUCoresPerPackage
26 | 2
27 | platformIdentifier
28 | com.apple.platform.macosx
29 |
30 | targetArchitecture
31 | i386
32 | targetDevice
33 |
34 | modelCode
35 | iPhone5,1
36 | operatingSystemVersion
37 | 8.0
38 | platformIdentifier
39 | com.apple.platform.iphonesimulator
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // InstaCubeExample
4 | //
5 | // Created by mrJacob on 6/15/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // InstaCubeExample
4 | //
5 | // Created by mrJacob on 6/15/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 | // Override point for customization after application launch.
21 | return YES;
22 | }
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
27 | }
28 |
29 | - (void)applicationDidEnterBackground:(UIApplication *)application {
30 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
32 | }
33 |
34 | - (void)applicationWillEnterForeground:(UIApplication *)application {
35 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
36 | }
37 |
38 | - (void)applicationDidBecomeActive:(UIApplication *)application {
39 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
40 | }
41 |
42 | - (void)applicationWillTerminate:(UIApplication *)application {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
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 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/ColorCubeViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ColorCubeViewController.swift
3 | // InstaCubeExample
4 | //
5 | // Created by mrJacob on 6/15/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 | import CoreImage
12 | import InstaCube
13 |
14 | class ColorCubeViewController : UIViewController, UITableViewDataSource, UITableViewDelegate {
15 |
16 | @IBOutlet var mainImageView : UIImageView?
17 | @IBOutlet var colorCubeSelectionColorCube : UITableView?
18 | var currentFilter : ColorCubeFilterList
19 | var rawImage : UIImage { return UIImage(named: "example") }
20 |
21 | init(coder aDecoder: NSCoder!) {
22 | currentFilter = ColorCubeFilterList.vibrance
23 | super.init(coder: aDecoder)
24 | }
25 |
26 | override func viewDidLoad() {
27 | super.viewDidLoad()
28 | }
29 |
30 | func generateColorCubeWithFilterListValue(colorCubeFilterListValue : ColorCubeFilterList) -> CIFilter {
31 | currentFilter = colorCubeFilterListValue
32 | let keyImage = UIImage(named: colorCubeFilterListValue.toRaw())
33 | return InstaCubeGenerator.instaCubeWithKeyImage(keyImage)
34 | }
35 |
36 | func filterImageWithColorCube(filter colorCubeCIFilter : CIFilter) {
37 | if let rawCGImage = rawImage.CGImage {
38 | if let ciImage = CIImage(CGImage: rawCGImage) as CIImage? {
39 | colorCubeCIFilter.setValue(ciImage, forKey: kCIInputImageKey)
40 | }
41 | else {
42 | return
43 | }
44 | }
45 | else {
46 | return
47 | }
48 |
49 | let outgoingImage = colorCubeCIFilter.valueForKey(kCIOutputImageKey) as CIImage
50 | if let checkedImageView = mainImageView {
51 | checkedImageView.image = UIImage(CIImage: outgoingImage)
52 | }
53 | }
54 |
55 | @IBAction func imageViewWasTapped(sender : UITapGestureRecognizer) {
56 | if sender.state == .Ended {
57 | if let checkedImageView = mainImageView {
58 | checkedImageView.image = rawImage
59 | }
60 | }
61 | }
62 |
63 | func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
64 | return ColorCubeFilterList.allValues.count
65 | }
66 |
67 | func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
68 | let tableViewCell : UITableViewCell! = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
69 | let filter = ColorCubeFilterList.allValues[indexPath.row]
70 | tableViewCell.textLabel.text = filter.displayName
71 |
72 | return tableViewCell
73 | }
74 |
75 | func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) {
76 | let filterListChoice = ColorCubeFilterList.allValues[indexPath.row]
77 | let colorCubeFilter = generateColorCubeWithFilterListValue(filterListChoice)
78 | filterImageWithColorCube(filter: colorCubeFilter)
79 | tableView.deselectRowAtIndexPath(indexPath, animated: true)
80 | }
81 | }
82 |
83 | enum ColorCubeFilterList : String {
84 | case solarize = "colorCube_solarize"
85 | case vibrance = "colorCube_vibrance"
86 | case threshold = "colorCube_threshold"
87 | case warming = "colorCube_warming"
88 | case green = "colorCube_green"
89 | case moody = "colorCube_moody"
90 | case chrome = "colorCube_chrome"
91 | case posterize = "colorCube_posterize"
92 | case inverse = "colorCube_inverse"
93 |
94 | var displayName : String {
95 | switch self {
96 | case .solarize:
97 | return "Solarized"
98 | case .vibrance:
99 | return "Vibrance"
100 | case .threshold:
101 | return "Threshold"
102 | case .green:
103 | return "Green Hue"
104 | case .warming:
105 | return "Warming"
106 | case .moody:
107 | return "Moody"
108 | case .chrome:
109 | return "Chrome"
110 | case .posterize:
111 | return "Posterize"
112 | case .inverse:
113 | return "Inverse"
114 | default:
115 | return "No display name"
116 | }
117 | }
118 |
119 | static let allValues = [solarize, vibrance, threshold, green, warming, moody, chrome, posterize, inverse]
120 | }
121 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-Small@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "40x40",
11 | "idiom" : "iphone",
12 | "filename" : "ios7_spotlight_icon@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "60x60",
17 | "idiom" : "iphone",
18 | "filename" : "ios7_app_icon_iphone@2x.png",
19 | "scale" : "2x"
20 | }
21 | ],
22 | "info" : {
23 | "version" : 1,
24 | "author" : "xcode"
25 | }
26 | }
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/Images.xcassets/AppIcon.appiconset/ios7_app_icon_iphone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/Images.xcassets/AppIcon.appiconset/ios7_app_icon_iphone@2x.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/Images.xcassets/AppIcon.appiconset/ios7_spotlight_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/Images.xcassets/AppIcon.appiconset/ios7_spotlight_icon@2x.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.sushiGrass.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/InstaCubeExample-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_chrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_chrome.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_green.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_inverse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_inverse.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_moody.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_moody.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_posterize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_posterize.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_solarize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_solarize.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_threshold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_threshold.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_vibrance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_vibrance.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/colorCube_warming.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/colorCube_warming.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/InstaCubeExample/InstaCubeExample/example.png
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // InstaCubeExample
4 | //
5 | // Created by mrJacob on 6/15/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.sushiGrass.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeExampleTests/InstaCubeExampleTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // InstaCubeExampleTests.m
3 | // InstaCubeExampleTests
4 | //
5 | // Created by mrJacob on 6/15/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 |
14 | @interface InstaCubeExampleTests : XCTestCase
15 |
16 | @end
17 |
18 | @implementation InstaCubeExampleTests
19 |
20 | //- (void)setUp {
21 | // [super setUp];
22 | // // Put setup code here. This method is called before the invocation of each test method in the class.
23 | //}
24 | //
25 | //- (void)tearDown {
26 | // // Put teardown code here. This method is called after the invocation of each test method in the class.
27 | // [super tearDown];
28 | //}
29 |
30 | - (void)testAllImagesFound {
31 | NSString *rootString = @"colorCube_";
32 | NSArray *cubeNameSuffixes = @[@"chrome",
33 | @"vibrance",
34 | @"threshold",
35 | @"solarize",
36 | @"warming",
37 | @"green",
38 | @"moody",
39 | @"posterize"];
40 | for (NSString *suffix in cubeNameSuffixes) {
41 | NSString *fileName = [rootString stringByAppendingString:suffix];
42 | UIImage *image = [UIImage imageNamed:fileName];
43 | XCTAssertNotNil(image, @"");
44 | }
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.sushiGrass.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/InstaCubeExample/InstaCubeTests/InstaCubeTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // InstaCubeTests.m
3 | // InstaCubeTests
4 | //
5 | // Created by mrJacob on 6/15/14.
6 | // Copyright (c) 2014 sushiGrass. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "InstaCube.h"
11 |
12 | @interface InstaCubeTests : XCTestCase
13 |
14 | @property (nonatomic, strong) NSBundle *testBundle;
15 | @property (nonatomic, strong, readonly) NSString *colorCubeString;
16 |
17 | @end
18 |
19 | @implementation InstaCubeTests
20 |
21 | - (void)setUp {
22 | [super setUp];
23 | self.testBundle = [NSBundle bundleForClass:[self class]];
24 | // Put setup code here. This method is called before the invocation of each test method in the class.
25 | }
26 |
27 | - (void)tearDown {
28 | // Put teardown code here. This method is called after the invocation of each test method in the class.
29 | [super tearDown];
30 | }
31 |
32 | - (void)testInstaCubeWithImageName {
33 | [self measureBlock:^{
34 | CIFilter *filter = [InstaCubeGenerator instaCubeWithKeyImageName:self.colorCubeString onBundle:self.testBundle];
35 | XCTAssertNotNil(filter, @"");
36 | }];
37 | }
38 |
39 | - (void)testInstaCubeWithImage {
40 | NSString *path = [self.testBundle pathForResource:self.colorCubeString ofType:@"png"];
41 | XCTAssertNotNil(path, @"");
42 | NSData *imageData = [NSData dataWithContentsOfFile:path];
43 | XCTAssertNotNil(imageData, @"");
44 | UIImage *colorCubeMoody = [UIImage imageWithData:imageData];
45 | XCTAssertNotNil(colorCubeMoody, @"");
46 | [self measureBlock:^{
47 | CIFilter *filter = [InstaCubeGenerator instaCubeWithKeyImage:colorCubeMoody];
48 | XCTAssertNotNil(filter, @"");
49 | }];
50 | }
51 |
52 | - (NSString *)colorCubeString {
53 | return @"colorCube_moody";
54 | }
55 |
56 | //- (void)testPerformanceExample {
57 | // // This is an example of a performance test case.
58 | // [self measureBlock:^{
59 | // // Put the code you want to measure the time of here.
60 | // }];
61 | //}
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | InstaCube
2 | =========
3 |
4 | A drop dead way to implement Color Cube in a CoreImage filter
5 |
6 | The Color Cube Core Image filter is [woefully](https://developer.apple.com/library/mac/documentation/graphicsimaging/conceptual/CoreImaging/ci_filer_recipes/ci_filter_recipes.html) [undocumented](https://developer.apple.com/library/mac/documentation/graphicsimaging/reference/CoreImageFilterReference/Reference/reference.html#//apple_ref/doc/filter/ci/CIColorCube).
7 |
8 | ####So, let's talk about [Color Lookup Tables](http://en.wikipedia.org/wiki/Colour_look-up_table).
9 |
10 | Essentially, if you were to think of each RGBA value having a color associated with it, think of a dictionary (or a "lookup" "table") that has uses that RGBA value as a key which then returns a new value to use in it's place.
11 |
12 | The roots of LUTs come from computer graphics and video games in order to quickly alter the appearance of graphics without a heavy cost. In fact, it was [this article](http://udn.epicgames.com/Three/ColorGrading.html) that got the ball rolling.
13 |
14 | How so? Apple describes their color cube as this:
15 |
16 | 
17 |
18 | But in actuality, it looks like this:
19 |
20 | 
21 |
22 | ####Great.
23 |
24 | InstaCube takes a key image, translates it to NSData that CIFilter Color Cube understands and set it to the correct InputKey that the CIFilter needs.
25 |
26 | What this means is that you take a generic key image like what's above and, using a photo editing application, apply color transformations that are uniform (think saturation, curves, levels, color multiplication) and not coordinate specific (think gradient, pattern overlay, masks, etc…). Afterwards, save the image, import and use with the following methods:
27 |
28 | + (CIFilter *)instaCubeWithKeyImageName:(NSString *)keyImageString onBundle:(NSBundle *)bundleOrNil;
29 |
30 | + (CIFilter *)instaCubeWithKeyImage:(UIImage *)keyImage;
31 |
32 | The resulting CIFilter will be of the type ColorCube but still need an input image in order to get the resulting output image.
33 |
34 | For example, applying a black & white plus a solarization filter results in this:
35 |
36 | 
37 |
38 | Using the Color Cube filter on the image results in:
39 |
40 |  to 
41 |
42 | ####Questions, comments, suggestions?
43 |
44 | [Email](mailto:jacob@sushigrass.com) or [Twitter](http://www.twitter.com/jacobvo)
45 |
46 |
--------------------------------------------------------------------------------
/Readme Images/After.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/Readme Images/After.png
--------------------------------------------------------------------------------
/Readme Images/Before.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/Readme Images/Before.png
--------------------------------------------------------------------------------
/Readme Images/appleCube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/Readme Images/appleCube.png
--------------------------------------------------------------------------------
/Readme Images/colorCube-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobvanorder/InstaCube/726a855a565cca35b1a559a4bd2f5161b6bfa8bd/Readme Images/colorCube-16.png
--------------------------------------------------------------------------------