Improved graphics output API, added formats JPEG, PNG, GIF.