Comments (5)
I'm sorry I won't be able to respond to you for at least two week as I am in vacation. I will respond once I have returned and recovered.
Thanks in advance,
Omid Hashemi
from filtrr.
Blocked from this problem too difficult.
People to be worried and I'll teach you.
unsigned char * data = malloc (_height * _width * 4);
Under part
data [outIndex] = [self safe: r];
data [outIndex + 1] = [self safe: g];
data [outIndex + 2] = [self safe: b];
data [outIndex + 3] = 255;
}
}
return data;
So after I fix the build.
from filtrr.
Fix:
-(id) convolve:(NSArray *) kernel {
CGContextRef cgctx = [self createARGBBitmapContextFromImage:self.CGImage];
size_t _width = CGImageGetWidth(self.CGImage);
size_t _height = CGImageGetHeight(self.CGImage);
unsigned char* inData = CGBitmapContextGetData (cgctx);
NSData* pixelData = (__bridge NSData*) CGDataProviderCopyData(CGImageGetDataProvider(self.CGImage));
NSMutableData* mutablePixelData = [pixelData mutableCopy];
//unsigned char* outData = (unsigned char*)[pixelData bytes];
unsigned char* outData = (unsigned char*)[mutablePixelData mutableBytes];
outData = [self convolveRaw:kernel InData:inData OuData:outData Height:_height Width:_width];
UIImage *newImage = [self createImageFromPixels:outData Length:pixelData.length];
// if(outData) free(outData);
if(inData) free(inData);
return newImage;
}
from filtrr.
Tried both methods. The second one by sprite2005 seemed to work better. Thank you. You should probably update the code in the repo
from filtrr.
The code is now updated. Thank you to all of you!
from filtrr.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filtrr.