GithubHelp home page GithubHelp logo

Not work with iPhone 6 simulator about filtrr HOT 5 CLOSED

omidh avatar omidh commented on August 30, 2024
Not work with iPhone 6 simulator

from filtrr.

Comments (5)

OmidH avatar OmidH commented on August 30, 2024

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.

ChoiBongKyu avatar ChoiBongKyu commented on August 30, 2024

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.

sprite2005 avatar sprite2005 commented on August 30, 2024

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.

darkmeton avatar darkmeton commented on August 30, 2024

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.

OmidH avatar OmidH commented on August 30, 2024

The code is now updated. Thank you to all of you!

from filtrr.

Related Issues (8)

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.