diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5d8c429 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +project.xcworkspace/ +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +.DS_Store + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +Pods/ diff --git a/README b/README deleted file mode 100644 index 8f9c05d..0000000 --- a/README +++ /dev/null @@ -1,24 +0,0 @@ -UIImage Image Processing extensions using the vDSP/Accelerate framework. - -Fast Image Blur/Sharpen/Emboss/Matrix operations for UIImage. - -REQUIRES IOS 4.0 and The Accelerate framework. - -I was in desperate need of a fast blur operation for UIImages and the OpenGL -solutions I've seen are a little complicated for my needs, these aren't quite -as fast but are potentially very powerful and still quite fast relative to -hand coding loops. - -Usage: -- Ensure your project is set with a base and deployment target > 4.0 -- Include the Accelerate Framework in your project -- Copy the UIImage+DSP.h and UIImage+DSP.m classes into your project -- In any class where you wish to use the functions import UIImage+DSP.h -- Call the imageByApplying... methods, these return an auto-released UIImage. - -blur example: - UIImage* src = [UIImage imageNamed:@"image.png"]; - UIImage* blurred = [src imageByApplyingGaussianBlur3x3]; - - -Please feel free to send any bugfixes/pull requests on if you've got something good! \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6186e93 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# UIImageDSP + +Category on UIImage provides processing extensions using the Accelerate framework. Original implemenation can be found [here](https://github.com/gdawg/uiimage-dsp). + +## Installation + +Add a dependency on `UIImageDSP` in your pod spec or Podfile + +## Use + +```objc +#import + +image = [originalImage imageByApplyingGaussianBlur3x3]; +``` + +Look in UIImage+DSP for all available methods. diff --git a/UIImageDSP.podspec b/UIImageDSP.podspec new file mode 100644 index 0000000..d385ea1 --- /dev/null +++ b/UIImageDSP.podspec @@ -0,0 +1,23 @@ +Pod::Spec.new do |s| + s.name = "UIImageDSP" + s.version = "0.0.1" + s.summary = "iOS UIImage processing functions using the Accelerate framework for speed" + s.homepage = "https://github.com/ssoper/uiimage-dsp" + + s.license = { + :type => 'Apache', + :file => 'LICENSE' + } + + s.authors = { + 'gdawg' => 'support@mad-dog-software.com', + 'Sean Soper' => 'sean.soper@gmail.com' + } + + s.requires_arc = true + s.platform = :ios, "7.0" + s.source = { :git => "https://github.com/ssoper/uiimage-dsp.git", :tag => s.version.to_s } + s.frameworks = 'Accelerate' + + s.source_files = 'UIImageDSP' +end diff --git a/image-dsp/UIImage+DSP.h b/UIImageDSP/UIImage+DSP.h similarity index 98% rename from image-dsp/UIImage+DSP.h rename to UIImageDSP/UIImage+DSP.h index 2fa6065..2efe3b2 100644 --- a/image-dsp/UIImage+DSP.h +++ b/UIImageDSP/UIImage+DSP.h @@ -11,7 +11,7 @@ // Most users will just want to call one of the imageByApplying... functions. // For more advanced use see the DSPMatrixSize typdef and imageByApplyingMatrix methods. -#import +@import UIKit; // all the different matrix sizes we support typedef enum { diff --git a/image-dsp/UIImage+DSP.m b/UIImageDSP/UIImage+DSP.m similarity index 98% rename from image-dsp/UIImage+DSP.m rename to UIImageDSP/UIImage+DSP.m index be5bf6c..6e1ec17 100644 --- a/image-dsp/UIImage+DSP.m +++ b/UIImageDSP/UIImage+DSP.m @@ -289,8 +289,8 @@ CGContextAndDataRef _dsp_utils_CreateARGBBitmapContext (CGImageRef inImage) CGContextRef context = NULL; CGColorSpaceRef colorSpace; void * bitmapData; - int bitmapByteCount; - int bitmapBytesPerRow; + NSInteger bitmapByteCount; + NSInteger bitmapBytesPerRow; size_t pixelsWide = CGImageGetWidth(inImage); @@ -314,7 +314,7 @@ CGContextAndDataRef _dsp_utils_CreateARGBBitmapContext (CGImageRef inImage) 8, bitmapBytesPerRow, colorSpace, - kCGImageAlphaPremultipliedFirst); + (CGBitmapInfo)kCGImageAlphaPremultipliedFirst); if (context == NULL) { free (bitmapData); diff --git a/UIImageDSPExample/Podfile b/UIImageDSPExample/Podfile new file mode 100644 index 0000000..6abc2ad --- /dev/null +++ b/UIImageDSPExample/Podfile @@ -0,0 +1,3 @@ +inhibit_all_warnings! + +pod 'UIImageDSP', :path => '..' diff --git a/UIImageDSPExample/Podfile.lock b/UIImageDSPExample/Podfile.lock new file mode 100644 index 0000000..5f0943e --- /dev/null +++ b/UIImageDSPExample/Podfile.lock @@ -0,0 +1,14 @@ +PODS: + - UIImageDSP (0.0.1) + +DEPENDENCIES: + - UIImageDSP (from `..`) + +EXTERNAL SOURCES: + UIImageDSP: + :path: .. + +SPEC CHECKSUMS: + UIImageDSP: f642f3d5df7af4cc70786192ee7e5d9af299acb8 + +COCOAPODS: 0.35.0 diff --git a/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.pbxproj b/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0aa31f6 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.pbxproj @@ -0,0 +1,510 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 8DA3A6421AAF81330042B689 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA3A6411AAF81330042B689 /* main.m */; }; + 8DA3A6451AAF81330042B689 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA3A6441AAF81330042B689 /* AppDelegate.m */; }; + 8DA3A6481AAF81330042B689 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA3A6471AAF81330042B689 /* MasterViewController.m */; }; + 8DA3A64B1AAF81330042B689 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA3A64A1AAF81330042B689 /* DetailViewController.m */; }; + 8DA3A64E1AAF81330042B689 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DA3A64C1AAF81330042B689 /* Main.storyboard */; }; + 8DA3A6501AAF81330042B689 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DA3A64F1AAF81330042B689 /* Images.xcassets */; }; + 8DA3A6531AAF81330042B689 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8DA3A6511AAF81330042B689 /* LaunchScreen.xib */; }; + 8DA3A65F1AAF81330042B689 /* UIImageDSPExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA3A65E1AAF81330042B689 /* UIImageDSPExampleTests.m */; }; + BBBE34BC1ABEBD4D67B49FD5 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D8CB39F91FBF05016DB8D61 /* libPods.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8DA3A6591AAF81330042B689 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 8DA3A6341AAF81330042B689 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8DA3A63B1AAF81330042B689; + remoteInfo = UIImageDSPExample; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 242F9B3B2E20B19AFC7C824E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + 2D8CB39F91FBF05016DB8D61 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 6CB4C6ADAF924A01A1D4EEB1 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 8DA3A63C1AAF81330042B689 /* UIImageDSPExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIImageDSPExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8DA3A6401AAF81330042B689 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8DA3A6411AAF81330042B689 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8DA3A6431AAF81330042B689 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 8DA3A6441AAF81330042B689 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 8DA3A6461AAF81330042B689 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; + 8DA3A6471AAF81330042B689 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; + 8DA3A6491AAF81330042B689 /* DetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; }; + 8DA3A64A1AAF81330042B689 /* DetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; }; + 8DA3A64D1AAF81330042B689 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8DA3A64F1AAF81330042B689 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 8DA3A6521AAF81330042B689 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 8DA3A6581AAF81330042B689 /* UIImageDSPExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIImageDSPExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 8DA3A65D1AAF81330042B689 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8DA3A65E1AAF81330042B689 /* UIImageDSPExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIImageDSPExampleTests.m; sourceTree = ""; }; + 8DA3A6691AAF81AE0042B689 /* UIImage+DSP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+DSP.h"; sourceTree = ""; }; + 8DA3A66A1AAF81AE0042B689 /* UIImage+DSP.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+DSP.m"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DA3A6391AAF81330042B689 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BBBE34BC1ABEBD4D67B49FD5 /* libPods.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8DA3A6551AAF81330042B689 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3514DB60ABAF09690292EF20 /* Pods */ = { + isa = PBXGroup; + children = ( + 6CB4C6ADAF924A01A1D4EEB1 /* Pods.debug.xcconfig */, + 242F9B3B2E20B19AFC7C824E /* Pods.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 4EBD9545574F0AE09EE43559 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 2D8CB39F91FBF05016DB8D61 /* libPods.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 8DA3A6331AAF81330042B689 = { + isa = PBXGroup; + children = ( + 8DA3A6681AAF81AE0042B689 /* UIImageDSP */, + 8DA3A63E1AAF81330042B689 /* UIImageDSPExample */, + 8DA3A65B1AAF81330042B689 /* UIImageDSPExampleTests */, + 8DA3A63D1AAF81330042B689 /* Products */, + 3514DB60ABAF09690292EF20 /* Pods */, + 4EBD9545574F0AE09EE43559 /* Frameworks */, + ); + sourceTree = ""; + }; + 8DA3A63D1AAF81330042B689 /* Products */ = { + isa = PBXGroup; + children = ( + 8DA3A63C1AAF81330042B689 /* UIImageDSPExample.app */, + 8DA3A6581AAF81330042B689 /* UIImageDSPExampleTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 8DA3A63E1AAF81330042B689 /* UIImageDSPExample */ = { + isa = PBXGroup; + children = ( + 8DA3A6431AAF81330042B689 /* AppDelegate.h */, + 8DA3A6441AAF81330042B689 /* AppDelegate.m */, + 8DA3A6461AAF81330042B689 /* MasterViewController.h */, + 8DA3A6471AAF81330042B689 /* MasterViewController.m */, + 8DA3A6491AAF81330042B689 /* DetailViewController.h */, + 8DA3A64A1AAF81330042B689 /* DetailViewController.m */, + 8DA3A64C1AAF81330042B689 /* Main.storyboard */, + 8DA3A64F1AAF81330042B689 /* Images.xcassets */, + 8DA3A6511AAF81330042B689 /* LaunchScreen.xib */, + 8DA3A63F1AAF81330042B689 /* Supporting Files */, + ); + path = UIImageDSPExample; + sourceTree = ""; + }; + 8DA3A63F1AAF81330042B689 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 8DA3A6401AAF81330042B689 /* Info.plist */, + 8DA3A6411AAF81330042B689 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 8DA3A65B1AAF81330042B689 /* UIImageDSPExampleTests */ = { + isa = PBXGroup; + children = ( + 8DA3A65E1AAF81330042B689 /* UIImageDSPExampleTests.m */, + 8DA3A65C1AAF81330042B689 /* Supporting Files */, + ); + path = UIImageDSPExampleTests; + sourceTree = ""; + }; + 8DA3A65C1AAF81330042B689 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 8DA3A65D1AAF81330042B689 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 8DA3A6681AAF81AE0042B689 /* UIImageDSP */ = { + isa = PBXGroup; + children = ( + 8DA3A6691AAF81AE0042B689 /* UIImage+DSP.h */, + 8DA3A66A1AAF81AE0042B689 /* UIImage+DSP.m */, + ); + name = UIImageDSP; + path = ../UIImageDSP; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DA3A63B1AAF81330042B689 /* UIImageDSPExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8DA3A6621AAF81330042B689 /* Build configuration list for PBXNativeTarget "UIImageDSPExample" */; + buildPhases = ( + 4069DC883FDBEE6A4173DDE9 /* Check Pods Manifest.lock */, + 8DA3A6381AAF81330042B689 /* Sources */, + 8DA3A6391AAF81330042B689 /* Frameworks */, + 8DA3A63A1AAF81330042B689 /* Resources */, + E76269BB37309C9BCD052719 /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = UIImageDSPExample; + productName = UIImageDSPExample; + productReference = 8DA3A63C1AAF81330042B689 /* UIImageDSPExample.app */; + productType = "com.apple.product-type.application"; + }; + 8DA3A6571AAF81330042B689 /* UIImageDSPExampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8DA3A6651AAF81330042B689 /* Build configuration list for PBXNativeTarget "UIImageDSPExampleTests" */; + buildPhases = ( + 8DA3A6541AAF81330042B689 /* Sources */, + 8DA3A6551AAF81330042B689 /* Frameworks */, + 8DA3A6561AAF81330042B689 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 8DA3A65A1AAF81330042B689 /* PBXTargetDependency */, + ); + name = UIImageDSPExampleTests; + productName = UIImageDSPExampleTests; + productReference = 8DA3A6581AAF81330042B689 /* UIImageDSPExampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8DA3A6341AAF81330042B689 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0610; + TargetAttributes = { + 8DA3A63B1AAF81330042B689 = { + CreatedOnToolsVersion = 6.1.1; + }; + 8DA3A6571AAF81330042B689 = { + CreatedOnToolsVersion = 6.1.1; + TestTargetID = 8DA3A63B1AAF81330042B689; + }; + }; + }; + buildConfigurationList = 8DA3A6371AAF81330042B689 /* Build configuration list for PBXProject "UIImageDSPExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 8DA3A6331AAF81330042B689; + productRefGroup = 8DA3A63D1AAF81330042B689 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DA3A63B1AAF81330042B689 /* UIImageDSPExample */, + 8DA3A6571AAF81330042B689 /* UIImageDSPExampleTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8DA3A63A1AAF81330042B689 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DA3A64E1AAF81330042B689 /* Main.storyboard in Resources */, + 8DA3A6531AAF81330042B689 /* LaunchScreen.xib in Resources */, + 8DA3A6501AAF81330042B689 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8DA3A6561AAF81330042B689 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4069DC883FDBEE6A4173DDE9 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + E76269BB37309C9BCD052719 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DA3A6381AAF81330042B689 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DA3A6451AAF81330042B689 /* AppDelegate.m in Sources */, + 8DA3A6481AAF81330042B689 /* MasterViewController.m in Sources */, + 8DA3A6421AAF81330042B689 /* main.m in Sources */, + 8DA3A64B1AAF81330042B689 /* DetailViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8DA3A6541AAF81330042B689 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DA3A65F1AAF81330042B689 /* UIImageDSPExampleTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8DA3A65A1AAF81330042B689 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8DA3A63B1AAF81330042B689 /* UIImageDSPExample */; + targetProxy = 8DA3A6591AAF81330042B689 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 8DA3A64C1AAF81330042B689 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8DA3A64D1AAF81330042B689 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8DA3A6511AAF81330042B689 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 8DA3A6521AAF81330042B689 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 8DA3A6601AAF81330042B689 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 8DA3A6611AAF81330042B689 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8DA3A6631AAF81330042B689 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CB4C6ADAF924A01A1D4EEB1 /* Pods.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = UIImageDSPExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 8DA3A6641AAF81330042B689 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 242F9B3B2E20B19AFC7C824E /* Pods.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = UIImageDSPExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 8DA3A6661AAF81330042B689 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = UIImageDSPExampleTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIImageDSPExample.app/UIImageDSPExample"; + }; + name = Debug; + }; + 8DA3A6671AAF81330042B689 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = UIImageDSPExampleTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIImageDSPExample.app/UIImageDSPExample"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8DA3A6371AAF81330042B689 /* Build configuration list for PBXProject "UIImageDSPExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8DA3A6601AAF81330042B689 /* Debug */, + 8DA3A6611AAF81330042B689 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8DA3A6621AAF81330042B689 /* Build configuration list for PBXNativeTarget "UIImageDSPExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8DA3A6631AAF81330042B689 /* Debug */, + 8DA3A6641AAF81330042B689 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8DA3A6651AAF81330042B689 /* Build configuration list for PBXNativeTarget "UIImageDSPExampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8DA3A6661AAF81330042B689 /* Debug */, + 8DA3A6671AAF81330042B689 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8DA3A6341AAF81330042B689 /* Project object */; +} diff --git a/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..406e79e --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.xcworkspace/xcuserdata/ssoper.xcuserdatad/UserInterfaceState.xcuserstate b/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.xcworkspace/xcuserdata/ssoper.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..5da2f22 Binary files /dev/null and b/UIImageDSPExample/UIImageDSPExample.xcodeproj/project.xcworkspace/xcuserdata/ssoper.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/UIImageDSPExample/UIImageDSPExample.xcworkspace/contents.xcworkspacedata b/UIImageDSPExample/UIImageDSPExample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..59ecee2 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/UIImageDSPExample/UIImageDSPExample/AppDelegate.h b/UIImageDSPExample/UIImageDSPExample/AppDelegate.h new file mode 100644 index 0000000..48c81ac --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// UIImageDSPExample +// +// Created by Sean Soper on 3/10/15. +// +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/UIImageDSPExample/UIImageDSPExample/AppDelegate.m b/UIImageDSPExample/UIImageDSPExample/AppDelegate.m new file mode 100644 index 0000000..66ea6e7 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/AppDelegate.m @@ -0,0 +1,61 @@ +// +// AppDelegate.m +// UIImageDSPExample +// +// Created by Sean Soper on 3/10/15. +// +// + +#import "AppDelegate.h" +#import "DetailViewController.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController; + UINavigationController *navigationController = [splitViewController.viewControllers lastObject]; + navigationController.topViewController.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem; + splitViewController.delegate = self; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // 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. + // 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. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // 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. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // 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. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // 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. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +#pragma mark - Split view + +- (BOOL)splitViewController:(UISplitViewController *)splitViewController collapseSecondaryViewController:(UIViewController *)secondaryViewController ontoPrimaryViewController:(UIViewController *)primaryViewController { + if ([secondaryViewController isKindOfClass:[UINavigationController class]] && [[(UINavigationController *)secondaryViewController topViewController] isKindOfClass:[DetailViewController class]] && ([(DetailViewController *)[(UINavigationController *)secondaryViewController topViewController] image] == nil)) { + // Return YES to indicate that we have handled the collapse by doing nothing; the secondary controller will be discarded. + return YES; + } else { + return NO; + } +} + +@end diff --git a/UIImageDSPExample/UIImageDSPExample/Base.lproj/LaunchScreen.xib b/UIImageDSPExample/UIImageDSPExample/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..69bd466 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UIImageDSPExample/UIImageDSPExample/Base.lproj/Main.storyboard b/UIImageDSPExample/UIImageDSPExample/Base.lproj/Main.storyboard new file mode 100644 index 0000000..ebec87f --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/Base.lproj/Main.storyboard @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UIImageDSPExample/UIImageDSPExample/DetailViewController.h b/UIImageDSPExample/UIImageDSPExample/DetailViewController.h new file mode 100644 index 0000000..3a5692a --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/DetailViewController.h @@ -0,0 +1,16 @@ +// +// DetailViewController.h +// UIImageDSPExample +// +// Created by Sean Soper on 3/10/15. +// +// + +#import + +@interface DetailViewController : UIViewController + +@property (strong, nonatomic) UIImage *image; + +@end + diff --git a/UIImageDSPExample/UIImageDSPExample/DetailViewController.m b/UIImageDSPExample/UIImageDSPExample/DetailViewController.m new file mode 100644 index 0000000..bb143f7 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/DetailViewController.m @@ -0,0 +1,36 @@ +// +// DetailViewController.m +// UIImageDSPExample +// +// Created by Sean Soper on 3/10/15. +// +// + +#import "DetailViewController.h" + +@interface DetailViewController () +@property (nonatomic, weak) IBOutlet UIImageView *imageView; +@end + +@implementation DetailViewController + +#pragma mark - Managing the detail item + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. + [self configureView]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (void) configureView { + if (self.image) { + self.imageView.image = self.image; + } +} + +@end diff --git a/UIImageDSPExample/UIImageDSPExample/Images.xcassets/AppIcon.appiconset/Contents.json b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..36d2c80 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/Contents.json b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/Contents.json new file mode 100644 index 0000000..1de3320 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "mt st helens 1x.jpg" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "mt st helens 2x.jpg" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "mt st helens.jpg" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens 1x.jpg b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens 1x.jpg new file mode 100644 index 0000000..1244161 Binary files /dev/null and b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens 1x.jpg differ diff --git a/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens 2x.jpg b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens 2x.jpg new file mode 100644 index 0000000..b340b6d Binary files /dev/null and b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens 2x.jpg differ diff --git a/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens.jpg b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens.jpg new file mode 100644 index 0000000..1244161 Binary files /dev/null and b/UIImageDSPExample/UIImageDSPExample/Images.xcassets/Image.imageset/mt st helens.jpg differ diff --git a/image-dsp/image-dsp-Info.plist b/UIImageDSPExample/UIImageDSPExample/Info.plist similarity index 50% rename from image-dsp/image-dsp-Info.plist rename to UIImageDSPExample/UIImageDSPExample/Info.plist index 3ae6dce..5a9538d 100644 --- a/image-dsp/image-dsp-Info.plist +++ b/UIImageDSPExample/UIImageDSPExample/Info.plist @@ -4,18 +4,14 @@ CFBundleDevelopmentRegion en - CFBundleDisplayName - ${PRODUCT_NAME} CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - + $(EXECUTABLE_NAME) CFBundleIdentifier - com.mad-dog-software.${PRODUCT_NAME:rfc1034identifier} + com.mad-dog-software.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString @@ -23,16 +19,39 @@ CFBundleSignature ???? CFBundleVersion - 1.0 + 1 LSRequiresIPhoneOS - NSMainNibFile - MainWindow + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarTintParameters + + UINavigationBar + + Style + UIBarStyleDefault + Translucent + + + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + diff --git a/UIImageDSPExample/UIImageDSPExample/MasterViewController.h b/UIImageDSPExample/UIImageDSPExample/MasterViewController.h new file mode 100644 index 0000000..410e576 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/MasterViewController.h @@ -0,0 +1,19 @@ +// +// MasterViewController.h +// UIImageDSPExample +// +// Created by Sean Soper on 3/10/15. +// +// + +#import + +@class DetailViewController; + +@interface MasterViewController : UITableViewController + +@property (strong, nonatomic) DetailViewController *detailViewController; + + +@end + diff --git a/UIImageDSPExample/UIImageDSPExample/MasterViewController.m b/UIImageDSPExample/UIImageDSPExample/MasterViewController.m new file mode 100644 index 0000000..759a11c --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/MasterViewController.m @@ -0,0 +1,123 @@ +// +// MasterViewController.m +// UIImageDSPExample +// +// Created by Sean Soper on 3/10/15. +// +// + +#import + +#import "MasterViewController.h" +#import "DetailViewController.h" + +@interface MasterViewController () +@property (nonatomic, strong) NSArray *blurs; +@end + +@implementation MasterViewController + +- (void)awakeFromNib { + [super awakeFromNib]; + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { + self.clearsSelectionOnViewWillAppear = NO; + self.preferredContentSize = CGSizeMake(320.0, 600.0); + } +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.blurs = @[@"Original", + @"Gaussian Blur 3x3", + @"Gaussian Blur 5x5", + @"Box Blur 3x3", + @"Sharpen 3x3", + @"Emboss 3x3", + @"Gaussian Blur 9x9", + @"Gaussian Blur 11x11", + @"Gaussian Blur 12x12"]; + + self.detailViewController = (DetailViewController *)[[self.splitViewController.viewControllers lastObject] topViewController]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - Segues + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + if ([[segue identifier] isEqualToString:@"showDetail"]) { + NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; + DetailViewController *controller = (DetailViewController *)[[segue destinationViewController] topViewController]; + controller.image = [self imageForIndexPath: indexPath]; + controller.navigationItem.leftBarButtonItem = self.splitViewController.displayModeButtonItem; + controller.navigationItem.leftItemsSupplementBackButton = YES; + } +} + +- (UIImage *) imageForIndexPath:(NSIndexPath *) indexPath { + UIImage *originalImage = [UIImage imageNamed:@"Image"]; + UIImage *image; + + switch (indexPath.row) { + case 0: + image = originalImage; + break; + + case 1: + image = [originalImage imageByApplyingGaussianBlur3x3]; + break; + + case 2: + image = [originalImage imageByApplyingGaussianBlur5x5]; + break; + + case 3: + image = [originalImage imageByApplyingBoxBlur3x3]; + break; + + case 4: + image = [originalImage imageByApplyingSharpen3x3]; + break; + + case 5: + image = [originalImage imageByApplyingEmboss3x3]; + break; + + case 6: + image = [originalImage imageByApplyingGaussianBlurOfSize:9 withSigmaSquared:90.0]; + break; + + case 7: + image = [originalImage imageByApplyingGaussianBlurOfSize:11 withSigmaSquared:90.0]; + break; + + case 8: + image = [originalImage imageByApplyingGaussianBlurOfSize:13 withSigmaSquared:90.0]; + break; + } + + return image; +} + +#pragma mark - Table View + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.blurs.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; + + cell.textLabel.text = self.blurs[indexPath.row]; + return cell; +} + +@end diff --git a/UIImageDSPExample/UIImageDSPExample/main.m b/UIImageDSPExample/UIImageDSPExample/main.m new file mode 100644 index 0000000..2e381d9 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExample/main.m @@ -0,0 +1,16 @@ +// +// main.m +// UIImageDSPExample +// +// Created by Sean Soper on 3/10/15. +// +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/UIImageDSPExample/UIImageDSPExampleTests/Info.plist b/UIImageDSPExample/UIImageDSPExampleTests/Info.plist new file mode 100644 index 0000000..bc356d1 --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.seansoper.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/UIImageDSPExample/UIImageDSPExampleTests/UIImageDSPExampleTests.m b/UIImageDSPExample/UIImageDSPExampleTests/UIImageDSPExampleTests.m new file mode 100644 index 0000000..2c3521a --- /dev/null +++ b/UIImageDSPExample/UIImageDSPExampleTests/UIImageDSPExampleTests.m @@ -0,0 +1,40 @@ +// +// UIImageDSPExampleTests.m +// UIImageDSPExampleTests +// +// Created by Sean Soper on 3/10/15. +// +// + +#import +#import + +@interface UIImageDSPExampleTests : XCTestCase + +@end + +@implementation UIImageDSPExampleTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/image-dsp.xcodeproj/project.pbxproj b/image-dsp.xcodeproj/project.pbxproj deleted file mode 100644 index 628a1a7..0000000 --- a/image-dsp.xcodeproj/project.pbxproj +++ /dev/null @@ -1,345 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 493252B61383938200D8B4F1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 493252B51383938200D8B4F1 /* UIKit.framework */; }; - 493252B81383938200D8B4F1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 493252B71383938200D8B4F1 /* Foundation.framework */; }; - 493252BA1383938200D8B4F1 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 493252B91383938200D8B4F1 /* CoreGraphics.framework */; }; - 493252C01383938200D8B4F1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 493252BE1383938200D8B4F1 /* InfoPlist.strings */; }; - 493252C31383938200D8B4F1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 493252C21383938200D8B4F1 /* main.m */; }; - 493252C61383938200D8B4F1 /* image_dspAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 493252C51383938200D8B4F1 /* image_dspAppDelegate.m */; }; - 493252C91383938300D8B4F1 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 493252C71383938300D8B4F1 /* MainWindow.xib */; }; - 493252CC1383938300D8B4F1 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 493252CB1383938300D8B4F1 /* RootViewController.m */; }; - 493252CF1383938300D8B4F1 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 493252CD1383938300D8B4F1 /* RootViewController.xib */; }; - 493252D8138393AB00D8B4F1 /* DisplayImageVc.m in Sources */ = {isa = PBXBuildFile; fileRef = 493252D6138393AB00D8B4F1 /* DisplayImageVc.m */; }; - 493252D9138393AB00D8B4F1 /* DisplayImageVc.xib in Resources */ = {isa = PBXBuildFile; fileRef = 493252D7138393AB00D8B4F1 /* DisplayImageVc.xib */; }; - 493252DC138393EC00D8B4F1 /* UIImage+DSP.m in Sources */ = {isa = PBXBuildFile; fileRef = 493252DB138393EC00D8B4F1 /* UIImage+DSP.m */; }; - 493252E61383942B00D8B4F1 /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = 493252E51383942B00D8B4F1 /* image.png */; }; - 493252E81383969E00D8B4F1 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 493252E71383969E00D8B4F1 /* Accelerate.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 493252B11383938200D8B4F1 /* image-dsp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "image-dsp.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 493252B51383938200D8B4F1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 493252B71383938200D8B4F1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 493252B91383938200D8B4F1 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 493252BD1383938200D8B4F1 /* image-dsp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "image-dsp-Info.plist"; sourceTree = ""; }; - 493252BF1383938200D8B4F1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 493252C11383938200D8B4F1 /* image-dsp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "image-dsp-Prefix.pch"; sourceTree = ""; }; - 493252C21383938200D8B4F1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 493252C41383938200D8B4F1 /* image_dspAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = image_dspAppDelegate.h; sourceTree = ""; }; - 493252C51383938200D8B4F1 /* image_dspAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = image_dspAppDelegate.m; sourceTree = ""; }; - 493252C81383938300D8B4F1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; - 493252CA1383938300D8B4F1 /* RootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; - 493252CB1383938300D8B4F1 /* RootViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; - 493252CE1383938300D8B4F1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/RootViewController.xib; sourceTree = ""; }; - 493252D5138393AB00D8B4F1 /* DisplayImageVc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayImageVc.h; sourceTree = ""; }; - 493252D6138393AB00D8B4F1 /* DisplayImageVc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DisplayImageVc.m; sourceTree = ""; }; - 493252D7138393AB00D8B4F1 /* DisplayImageVc.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DisplayImageVc.xib; sourceTree = ""; }; - 493252DA138393EC00D8B4F1 /* UIImage+DSP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+DSP.h"; sourceTree = ""; }; - 493252DB138393EC00D8B4F1 /* UIImage+DSP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+DSP.m"; sourceTree = ""; }; - 493252E51383942B00D8B4F1 /* image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = image.png; sourceTree = ""; }; - 493252E71383969E00D8B4F1 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 493252AE1383938200D8B4F1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 493252E81383969E00D8B4F1 /* Accelerate.framework in Frameworks */, - 493252B61383938200D8B4F1 /* UIKit.framework in Frameworks */, - 493252B81383938200D8B4F1 /* Foundation.framework in Frameworks */, - 493252BA1383938200D8B4F1 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 493252A61383938200D8B4F1 = { - isa = PBXGroup; - children = ( - 493252E71383969E00D8B4F1 /* Accelerate.framework */, - 493252BB1383938200D8B4F1 /* image-dsp */, - 493252B41383938200D8B4F1 /* Frameworks */, - 493252B21383938200D8B4F1 /* Products */, - ); - sourceTree = ""; - }; - 493252B21383938200D8B4F1 /* Products */ = { - isa = PBXGroup; - children = ( - 493252B11383938200D8B4F1 /* image-dsp.app */, - ); - name = Products; - sourceTree = ""; - }; - 493252B41383938200D8B4F1 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 493252B51383938200D8B4F1 /* UIKit.framework */, - 493252B71383938200D8B4F1 /* Foundation.framework */, - 493252B91383938200D8B4F1 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 493252BB1383938200D8B4F1 /* image-dsp */ = { - isa = PBXGroup; - children = ( - 49CAB40913840EDB00CA934B /* Classes */, - 49CAB40B13840EEB00CA934B /* Examples */, - 493252BC1383938200D8B4F1 /* Supporting Files */, - ); - path = "image-dsp"; - sourceTree = ""; - }; - 493252BC1383938200D8B4F1 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 49CAB40C13840F1700CA934B /* images */, - 493252BD1383938200D8B4F1 /* image-dsp-Info.plist */, - 493252BE1383938200D8B4F1 /* InfoPlist.strings */, - 493252C11383938200D8B4F1 /* image-dsp-Prefix.pch */, - 493252C21383938200D8B4F1 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 49CAB40913840EDB00CA934B /* Classes */ = { - isa = PBXGroup; - children = ( - 493252DA138393EC00D8B4F1 /* UIImage+DSP.h */, - 493252DB138393EC00D8B4F1 /* UIImage+DSP.m */, - ); - name = Classes; - sourceTree = ""; - }; - 49CAB40B13840EEB00CA934B /* Examples */ = { - isa = PBXGroup; - children = ( - 49CAB40D13840F1F00CA934B /* Views */, - 493252C41383938200D8B4F1 /* image_dspAppDelegate.h */, - 493252C51383938200D8B4F1 /* image_dspAppDelegate.m */, - ); - name = Examples; - sourceTree = ""; - }; - 49CAB40C13840F1700CA934B /* images */ = { - isa = PBXGroup; - children = ( - 493252E51383942B00D8B4F1 /* image.png */, - ); - name = images; - sourceTree = ""; - }; - 49CAB40D13840F1F00CA934B /* Views */ = { - isa = PBXGroup; - children = ( - 493252C71383938300D8B4F1 /* MainWindow.xib */, - 493252CA1383938300D8B4F1 /* RootViewController.h */, - 493252CB1383938300D8B4F1 /* RootViewController.m */, - 493252CD1383938300D8B4F1 /* RootViewController.xib */, - 493252D5138393AB00D8B4F1 /* DisplayImageVc.h */, - 493252D6138393AB00D8B4F1 /* DisplayImageVc.m */, - 493252D7138393AB00D8B4F1 /* DisplayImageVc.xib */, - ); - name = Views; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 493252B01383938200D8B4F1 /* image-dsp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 493252D21383938300D8B4F1 /* Build configuration list for PBXNativeTarget "image-dsp" */; - buildPhases = ( - 493252AD1383938200D8B4F1 /* Sources */, - 493252AE1383938200D8B4F1 /* Frameworks */, - 493252AF1383938200D8B4F1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "image-dsp"; - productName = "image-dsp"; - productReference = 493252B11383938200D8B4F1 /* image-dsp.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 493252A81383938200D8B4F1 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0430; - }; - buildConfigurationList = 493252AB1383938200D8B4F1 /* Build configuration list for PBXProject "image-dsp" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 493252A61383938200D8B4F1; - productRefGroup = 493252B21383938200D8B4F1 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 493252B01383938200D8B4F1 /* image-dsp */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 493252AF1383938200D8B4F1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 493252C01383938200D8B4F1 /* InfoPlist.strings in Resources */, - 493252C91383938300D8B4F1 /* MainWindow.xib in Resources */, - 493252CF1383938300D8B4F1 /* RootViewController.xib in Resources */, - 493252D9138393AB00D8B4F1 /* DisplayImageVc.xib in Resources */, - 493252E61383942B00D8B4F1 /* image.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 493252AD1383938200D8B4F1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 493252C31383938200D8B4F1 /* main.m in Sources */, - 493252C61383938200D8B4F1 /* image_dspAppDelegate.m in Sources */, - 493252CC1383938300D8B4F1 /* RootViewController.m in Sources */, - 493252D8138393AB00D8B4F1 /* DisplayImageVc.m in Sources */, - 493252DC138393EC00D8B4F1 /* UIImage+DSP.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 493252BE1383938200D8B4F1 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 493252BF1383938200D8B4F1 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 493252C71383938300D8B4F1 /* MainWindow.xib */ = { - isa = PBXVariantGroup; - children = ( - 493252C81383938300D8B4F1 /* en */, - ); - name = MainWindow.xib; - sourceTree = ""; - }; - 493252CD1383938300D8B4F1 /* RootViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - 493252CE1383938300D8B4F1 /* en */, - ); - name = RootViewController.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 493252D01383938300D8B4F1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 493252D11383938300D8B4F1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - }; - name = Release; - }; - 493252D31383938300D8B4F1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "image-dsp/image-dsp-Prefix.pch"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_FILE = "image-dsp/image-dsp-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 493252D41383938300D8B4F1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "image-dsp/image-dsp-Prefix.pch"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_FILE = "image-dsp/image-dsp-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 493252AB1383938200D8B4F1 /* Build configuration list for PBXProject "image-dsp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 493252D01383938300D8B4F1 /* Debug */, - 493252D11383938300D8B4F1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 493252D21383938300D8B4F1 /* Build configuration list for PBXNativeTarget "image-dsp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 493252D31383938300D8B4F1 /* Debug */, - 493252D41383938300D8B4F1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 493252A81383938200D8B4F1 /* Project object */; -} diff --git a/image-dsp/DisplayImageVc.h b/image-dsp/DisplayImageVc.h deleted file mode 100644 index c84d45b..0000000 --- a/image-dsp/DisplayImageVc.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// DisplayImageVc.h -// image-dsp -// -// Created by andrew on 18/05/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import - - -@interface DisplayImageVc : UIViewController { -} - -@property (nonatomic,retain) IBOutlet UIImageView* imageView; - -@property (nonatomic,retain) UIImage* src; -@property (nonatomic,retain) UIImage* dest; - --(IBAction) changeImage:(UISegmentedControl*)imageControl; - -@end diff --git a/image-dsp/DisplayImageVc.m b/image-dsp/DisplayImageVc.m deleted file mode 100644 index b0cee2b..0000000 --- a/image-dsp/DisplayImageVc.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// DisplayImageVc.m -// image-dsp -// -// Created by andrew on 18/05/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import "DisplayImageVc.h" - - -@implementation DisplayImageVc - -@synthesize imageView=__imageView; -@synthesize src=__src; -@synthesize dest=__dest; - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.imageView.image = self.dest; -} - --(IBAction) changeImage:(UISegmentedControl*)imageControl { - switch (imageControl.selectedSegmentIndex) { - case 0: - self.imageView.image = self.src; - break; - - case 1: - self.imageView.image = self.dest; - break; - - default: - break; - } -} - -- (void)dealloc{ - [__dest release]; - [__src release]; - [__imageView release]; - [super dealloc]; -} - -@end diff --git a/image-dsp/DisplayImageVc.xib b/image-dsp/DisplayImageVc.xib deleted file mode 100644 index ebac1ea..0000000 --- a/image-dsp/DisplayImageVc.xib +++ /dev/null @@ -1,265 +0,0 @@ - - - - 1056 - 10J869 - 1306 - 1038.35 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 301 - - - YES - IBUIImageView - IBUIView - IBUISegmentedControl - IBProxyObject - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 274 - {320, 416} - - - - NO - IBCocoaTouchFramework - - - - 292 - {{93, 353}, {207, 44}} - - - - NO - IBCocoaTouchFramework - 2 - 1 - - YES - Source - Dest - - - YES - - - - - YES - - - - - YES - {0, 0} - {0, 0} - - - YES - - - - - - {{0, 64}, {320, 416}} - - - - - 3 - MQA - - 2 - - - - - NO - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - imageView - - - - 6 - - - - changeImage: - - - 13 - - 7 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 4.IBPluginDependency - 5.IBPluginDependency - 5.IUISegmentedControlInspectorSelectedSegmentMetadataKey - - - YES - DisplayImageVc - UIResponder - {{556, 412}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - YES - - - - - - YES - - - - - 7 - - - - YES - - DisplayImageVc - UIViewController - - changeImage: - UISegmentedControl - - - changeImage: - - changeImage: - UISegmentedControl - - - - imageView - UIImageView - - - imageView - - imageView - UIImageView - - - - IBProjectSource - ./Classes/DisplayImageVc.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 301 - - diff --git a/image-dsp/RootViewController.h b/image-dsp/RootViewController.h deleted file mode 100644 index 388cf4f..0000000 --- a/image-dsp/RootViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// RootViewController.h -// image-dsp -// -// Created by andrew on 18/05/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import - -@interface RootViewController : UITableViewController { - -} - - -@end diff --git a/image-dsp/RootViewController.m b/image-dsp/RootViewController.m deleted file mode 100644 index 64d5e45..0000000 --- a/image-dsp/RootViewController.m +++ /dev/null @@ -1,202 +0,0 @@ -// -// RootViewController.m -// image-dsp -// -// Created by andrew on 18/05/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import "RootViewController.h" -#import "DisplayImageVc.h" - -#import "UIImage+DSP.h" - -@implementation RootViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.title = @"vDSP"; - -} - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 2; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - switch (section) { - case 0: - return 5; - break; - case 1: - return 4; - - default: - break; - } - return -1; -} - -// Customize the appearance of table view cells. -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - } - - // Configure the cell. - switch (indexPath.section) { - case 0: - switch (indexPath.row) { - case 0: - cell.textLabel.text = @"Gaussian Blur 3x3"; - break; - - case 1: - cell.textLabel.text = @"Gaussian Blur 5x5"; - break; - - case 2: - cell.textLabel.text = @"Box Blur 3x3"; - break; - - case 3: - cell.textLabel.text = @"Sharpen 3x3"; - break; - - case 4: - cell.textLabel.text = @"Emboss 3x3"; - break; - - default: - break; - } - break; - case 1: - switch (indexPath.row) { - case 0: - cell.textLabel.text = @"Gaussian Blur 9x9"; - break; - case 1: - cell.textLabel.text = @"Gaussian Blur 10x10"; - break; - case 2: - cell.textLabel.text = @"Gaussian Blur 11x11"; - break; - case 3: - cell.textLabel.text = @"Gaussian Blur 12x12"; - break; - - default: - break; - } - break; - - default: - break; - } - - - return cell; -} - - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - // setup for display - DisplayImageVc* vc = [[DisplayImageVc alloc] initWithNibName:@"DisplayImageVc" bundle:nil]; - - // load source image - vc.src = [UIImage imageNamed:@"image.png"]; - - // transform as selected - switch (indexPath.section) { - case 0: - switch (indexPath.row) { - case 0: - vc.dest = [vc.src imageByApplyingGaussianBlur3x3]; - break; - - case 1: - vc.dest = [vc.src imageByApplyingGaussianBlur5x5]; - break; - - case 2: - vc.dest = [vc.src imageByApplyingBoxBlur3x3]; - break; - - case 3: - vc.dest = [vc.src imageByApplyingSharpen3x3]; - break; - - case 4: - vc.dest = [vc.src imageByApplyingEmboss3x3]; - break; - - default: - break; - } - break; - case 1: - switch (indexPath.row) { - case 0: - vc.dest = [vc.src imageByApplyingGaussianBlurOfSize:9 withSigmaSquared:90.0]; - break; - - case 1: - vc.dest = [[vc.src imageByApplyingGaussianBlurOfSize:10 withSigmaSquared:90.0] retain]; - break; - - case 2: - vc.dest = [[vc.src imageByApplyingGaussianBlurOfSize:11 withSigmaSquared:90.0] retain]; - break; - - case 3: - vc.dest = [[vc.src imageByApplyingGaussianBlurOfSize:13 withSigmaSquared:90.0] retain]; - break; - } - break; - - default: - break; - } - - UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath]; - vc.title = cell.textLabel.text; - - [self.navigationController pushViewController:vc animated:NO]; - [vc release]; - -} - -- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { - switch (section) { - case 0: - return @"Examples:"; - case 1: - return @"Advanced"; - - default: - return @""; - } -} - -- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { - switch (section) { - case 0: - return @"UIImage category for vDSP processing.\nhttps://github.com/gdawg/uiimage-dsp\n"; - break; - default: - break; - } - return nil; -} - -@end diff --git a/image-dsp/en.lproj/InfoPlist.strings b/image-dsp/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/image-dsp/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/image-dsp/en.lproj/MainWindow.xib b/image-dsp/en.lproj/MainWindow.xib deleted file mode 100644 index 9cdec10..0000000 --- a/image-dsp/en.lproj/MainWindow.xib +++ /dev/null @@ -1,311 +0,0 @@ - - - - 1024 - 10J869 - 1306 - 1038.35 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 301 - - - YES - IBProxyObject - IBUINavigationController - IBUIViewController - IBUICustomObject - IBUIWindow - IBUINavigationBar - IBUINavigationItem - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - IBCocoaTouchFramework - - - - 1316 - - {320, 480} - - - - - 1 - MSAxIDEAA - - NO - NO - - IBCocoaTouchFramework - YES - - - - - 1 - 1 - - IBCocoaTouchFramework - NO - - - 256 - {0, 0} - NO - YES - YES - IBCocoaTouchFramework - - - YES - - - IBCocoaTouchFramework - - - RootViewController - - - 1 - 1 - - IBCocoaTouchFramework - NO - - - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - navigationController - - - - 15 - - - - - YES - - 0 - - - - - - 2 - - - YES - - - - - -1 - - - File's Owner - - - 3 - - - - - -2 - - - - - 9 - - - YES - - - - - - - 11 - - - - - 13 - - - YES - - - - - - 14 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 11.IBPluginDependency - 13.CustomClassName - 13.IBPluginDependency - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 9.IBEditorWindowLastContentRect - 9.IBPluginDependency - - - YES - UIApplication - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - RootViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - YES - - - - {{673, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - image_dspAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{186, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 16 - - - - YES - - RootViewController - UITableViewController - - IBProjectSource - ./Classes/RootViewController.h - - - - image_dspAppDelegate - NSObject - - YES - - YES - navigationController - window - - - YES - UINavigationController - UIWindow - - - - YES - - YES - navigationController - window - - - YES - - navigationController - UINavigationController - - - window - UIWindow - - - - - IBProjectSource - ./Classes/image_dspAppDelegate.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 301 - - diff --git a/image-dsp/en.lproj/RootViewController.xib b/image-dsp/en.lproj/RootViewController.xib deleted file mode 100644 index 05bce42..0000000 --- a/image-dsp/en.lproj/RootViewController.xib +++ /dev/null @@ -1,209 +0,0 @@ - - - - 784 - 10J869 - 1306 - 1038.35 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 301 - - - YES - IBProxyObject - IBUITableView - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 247} - - - - - 10 - - 549453824 - {84, 1} - - YES - - YES - - - - TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ -y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ -xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ -xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ -xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ -xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB -AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA - - - - - - 3 - MCAwAA - - - groupTableViewBackgroundColor - - NO - YES - NO - - 3 - 3 - - IBCocoaTouchFramework - NO - 1 - 2 - 0 - YES - 44 - 10 - 10 - - - - - YES - - - view - - - - 3 - - - - dataSource - - - - 4 - - - - delegate - - - - 5 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - - - YES - RootViewController - UIResponder - {{144, 609}, {320, 247}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 5 - - - - YES - - RootViewController - UITableViewController - - IBProjectSource - ./Classes/RootViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 301 - - diff --git a/image-dsp/image-dsp-Prefix.pch b/image-dsp/image-dsp-Prefix.pch deleted file mode 100644 index ebc19fd..0000000 --- a/image-dsp/image-dsp-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'image-dsp' target in the 'image-dsp' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/image-dsp/image.png b/image-dsp/image.png deleted file mode 100644 index c49a57d..0000000 Binary files a/image-dsp/image.png and /dev/null differ diff --git a/image-dsp/image_dspAppDelegate.h b/image-dsp/image_dspAppDelegate.h deleted file mode 100644 index eefb7ee..0000000 --- a/image-dsp/image_dspAppDelegate.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// image_dspAppDelegate.h -// image-dsp -// -// Created by andrew on 18/05/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import - -@interface image_dspAppDelegate : NSObject { - -} - -@property (nonatomic, retain) IBOutlet UIWindow *window; - -@property (nonatomic, retain) IBOutlet UINavigationController *navigationController; - -@end diff --git a/image-dsp/image_dspAppDelegate.m b/image-dsp/image_dspAppDelegate.m deleted file mode 100644 index 05a4404..0000000 --- a/image-dsp/image_dspAppDelegate.m +++ /dev/null @@ -1,73 +0,0 @@ -// -// image_dspAppDelegate.m -// image-dsp -// -// Created by andrew on 18/05/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import "image_dspAppDelegate.h" - -@implementation image_dspAppDelegate - - -@synthesize window=_window; - -@synthesize navigationController=_navigationController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - // Override point for customization after application launch. - // Add the navigation controller's view to the window and display. - self.window.rootViewController = self.navigationController; - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - /* - 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. - 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. - */ -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - /* - 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. - If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - */ -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - /* - 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. - */ -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - /* - 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. - */ -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - /* - Called when the application is about to terminate. - Save data if appropriate. - See also applicationDidEnterBackground:. - */ -} - -- (void)dealloc -{ - [_window release]; - [_navigationController release]; - [super dealloc]; -} - -@end diff --git a/image-dsp/main.m b/image-dsp/main.m deleted file mode 100644 index c69cb65..0000000 --- a/image-dsp/main.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// main.m -// image-dsp -// -// Created by andrew on 18/05/11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -}