Unnecessary memory allocation
in - initWithCGImage of GPUImagePicture.m (line 48) It should be: BOOL shouldRedrawUsingCoreGraphics = NO; Instead of: BOOL shouldRedrawUsingCoreGraphics = YES;
Now I know where the memory warning came from
There's a reason for that. In my benchmarks, the other path was slower than the redrawing approach, and it doesn't work with all image formats. I've left that code in there for reference, but I've disabled it for that reason.
There should be no memory differences between the two paths, so I don't think this is the source of any memory-related issues for you.
i use photoshop to compress a jpeg image,if you redraw the image , it will larger than before. so i think it should be: BOOL shouldRedrawUsingCoreGraphics = NO;
Andy: No, actually you have to bind raw bitmap to GPU memory anyway. It doesn't matter how small the file is, but the pixel does.
@AndyWallace - No, that has nothing to do with this. All images have to be uncompressed into memory to work with them. No matter the source, the size in memory of your image will be width x height x 4 bytes (RGBA). Each additional framebuffer adds another uncompressed image. If you look at the actual code for this method, you will see that there is no memory difference between the two branches. It's purely a decoding performance issue.