Jump to content

BlitzMax/Modules/Graphics/JPG loader

From Wikibooks, open books for an open world

The JPG loader module provides the ability to load JPG format pixmaps.

Functions

[edit | edit source]

LoadPixmapJPeg

[edit | edit source]

Function LoadPixmapJPeg:TPixmap( url:Object )

Description: Load a Pixmap in JPeg format

Information: LoadPixmapJPeg loads a pixmap from url in JPeg format.

If the pixmap cannot be loaded, Null is returned.

SavePixmapJPeg

[edit | edit source]

Function SavePixmapJPeg( pixmap:TPixmap,url:Object,quality=75 )

Description: Save a Pixmap in JPeg format

Information: Saves pixmap to url in JPeg format. If successful, SavePixmapJPeg returns True, otherwise False.

The optional quality parameter should be in the range 0 to 100, where 0 indicates poor quality (smallest) and 100 indicates best quality (largest).