Manual Memory Management for images