tomsoft1 / stackblurios Goto Github PK
View Code? Open in Web Editor NEWStack Blur implementation for iOS
Stack Blur implementation for iOS
Thanks for your work.
This works perfect when we use this with the locally stored image. I was trying to use this with the SDWebImage completion blocks where we set the image to the imageView after the image is downloaded from URL but the blur adds some blue shades all over the image if we use the image downloaded using SDWebImage
Any one faced this issue? Need help!
Thanks.
Update:
i managed to fix this issue by converting the downloaded image with UIImageJPEGRepresentation.
UIImage *processedImage = [[UIImage imageWithData:UIImageJPEGRepresentation(downloadedImage, 1)] stackBlur:10]
imageVIew.image = processedImage
fbc.blurredImage = [[self screenShot:self.view] stackBlur:8];
//fbc.blurredImage = [self screenShot:self.view];
For a large UIImage (screenshot) it seems like stackBlur offsets the original image vertically by something like 25 pixels.
If I comment out the first line and uncomment the 2nd one, I see the original, non-offset Image.
Otherwise the first 20-30 scan lines are not blurred, then followed by the same 20-30 scan lines but now blurred.
The Xcode 4.6.2 static analyzer reports (correctly as far as I can see) that the object returned by CGDataProviderCopyData() is leaked.
It also reports two logic errors, which might be false positives. In any case it'd be nice to quiet the warnings.
This looks really useful! I'd love to use it in my project but the license isn't specified, which makes it impossible to use in shipping code. Would you consider opening it up with a BSD or Apache license? Thanks for your consideration.
Hi,
First thanks for such class. In XCode 5.1.1 this warning appears ๐
UIImage+StackBlur.m:319:58: Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapInfo' (aka 'enum CGBitmapInfo')
Best Regards
there seems to be a crash, can someone look into it? I'll come back with more information later.
Hello
thanks for the excellent piece of work.
I am having one problem which is weird.
when i am compiling to device the blurring works. when i am uploading the build through testflight to device the app crashes when blurring the image.
here is the trace:
0 libsystem_c.dylib 0x3c26e034 memmove$VARIANT$Swift + 46
1 CoreGraphics 0x34199cc2 copy_read_only + 194
2 CoreGraphics 0x3427af08 CGDataProviderCopyData + 56
can you provide any assistance?
thanks
K.K
if i want to blur this image https://dl.dropbox.com/u/1378133/m.jpg i have EXC_BAD_ACESS. on this string
sir[0]=m_PixelBuf[offset];
Has anyone noticed following warnings while Analysing code? I have tried fixing by initialising values for rsum or dv but not able to resolve them. Has anyone fixed them?
...StackBlur/UIImage+StackBlur.m:155:4: Assigned value is garbage or undefined
...StackBlur/UIImage+StackBlur.m:244:4: Assigned value is garbage or undefined
Thanks.
I'm not quite sure what's happening but my image which is 320x320 becomes 320x640 after running
UIImage *newIma=[oldIma stackBlur:radius];
Any ideas?
i found memory leak in UIImage+StackBlur.m stackBlur: method.
check this:
CFMutableDataRef m_DataRef = CFDataCreateMutableCopy(0, 0, CGDataProviderCopyData(CGImageGetDataProvider(inImage)));
CGDataProviderCopyData copy data but not release.
When I tried to normalize an @2x image (for retina display) it returns a LowQuality image. I use normalize to revert the blur effect, but anyway, If I don't use normalize, the image looks like reversed color. How can we solve this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.