app: revive debug utility function gimp_create_image_from_buffer()

and fix it not to leak the created image.