Just write a shader and process the image with bmap_process