Git Product home page Git Product logo

swiftuiimageeffects's People

Contributors

globchastyy avatar luongvm avatar pixeldock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swiftuiimageeffects's Issues

Much, much slower than the Objective-C version

Nice to have a Swift version, but do some time profiling and you'll find it is much, much slower than the Objective-C version. Setting a blur radius of 20 with no tint or saturation to my image takes 96 ms with the Objective-C version. This Swift version takes 1106 ms!

Even when I don't apply any blur, tint, or saturation, it's still slower. In my case, it takes 322 ms to apply no effect. This is compared to 36 ms from the Objective-C version with the same image and settings.

applying blur to the image

Using the Obj C version, I'm able to apply a blur to the image like so:

effectImage = [self.image applyBlurWithRadius:15.0 tintColor:[UIColor colorWithWhite:1.0 alpha:0.2] saturationDeltaFactor:1.2 maskImage:self.image];

When I try to do the same thing with your Swift version, thus:

imageView.image = image.applyBlurWithRadius(15.0, tintColor: UIColor(white: 1.0, alpha: 0.2), saturationDeltaFactor: 1.2, maskImage: image)

.. I get an interesting effect, but it's definitely not a blur. Am I calling it correctly?

need to import some framework?

your example project has a trouble with build in iOS SDK 8.3 & xCode 6.3

I'm new in Swift , don't know about why this error occur.
This is just a report.

Thanks in advance.

2015-04-13 8 48 52

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.