图片打马赛克

#pragma mark - 马赛克
- (UIImage *)Mosaic:(UIImage *)inImage Level:(int)level
{
    unsigned char *imgPixel = RequestImagePixelData(inImage);
    CGImageRef inImageRef = [inImage CGImage];
    GLuint width = CGImageGetWidth(inImageRef);
    GLuint height = CGImageGetHeight(inImageRef);
    unsigned char prev[4] = {0};
    int bytewidth = width*4;
    int i,j;
    int val = level;
    for(i=0;i

你可能感兴趣的:(图片打马赛克)