Removed warnings, added check for TEXT_SAVE_IMAGE_FUNCTION