Image Handlers

#blitzmax #library

Brucey 68bebaf3c6 Merge pull request #38 from bmx-ng/task/libpng-update-1.6.48 há 2 meses atrás
bmp.mod e34ab67697 Example tweaks. há 3 anos atrás
cms.mod 30d2151aea Added image.cms (wip) há 2 anos atrás
gif.mod 47f912345d Update gif.bmx há 1 ano atrás
ilbm.mod be99aa343c Fixed build issue. há 6 meses atrás
jpeg2000.mod 1e04e33e5b Fixed 32-bit and Win32 build issues. há 2 anos atrás
jpg.mod e34ab67697 Example tweaks. há 3 anos atrás
jxl.mod b6f7ff47cb JXL only available for 64-bit builds. há 2 anos atrás
jxlwriter.mod b6f7ff47cb JXL only available for 64-bit builds. há 2 anos atrás
pcx.mod f580bdfe65 Requires c99. há 3 anos atrás
pic.mod 3be3e9cb9d Added PIC image loader. Resolves #8. há 3 anos atrás
png.mod 6b2cfb26b8 Updated to libpng 1.6.48 há 2 meses atrás
pnm.mod e34ab67697 Example tweaks. há 3 anos atrás
qoi.mod e34ab67697 Example tweaks. há 3 anos atrás
raw.mod e34ab67697 Example tweaks. há 3 anos atrás
stb.mod 7572eee874 Updated to stb image 2.30. Resolves #34. há 10 meses atrás
svg.mod 6d9fe0abc4 Changed to use lunasvg instead of nanosvg há 10 meses atrás
tga.mod e34ab67697 Example tweaks. há 3 anos atrás
tiff.mod e5fdffa985 Fixed potential build issue há 5 meses atrás
webp.mod 778768c8a7 Updated to libwebp 1.3.2.d7a0506 há 1 ano atrás
yuv.mod f16795a44e Fixed macos build. há 11 meses atrás
.gitignore d477cdd6f7 Added Qoi image loader. Resolves #2. há 3 anos atrás
README.md 1c992a6ad4 Ensure libpng uses the correct zlib header. há 2 anos atrás

README.md

image.mod

BlitzMax includes support for loading many different image formats.

Simply import one of the image modules, and you will be able to load images of that format into a TPixmap.

Supported formats

The following image formats are currently supported :

BMP

Usage :

Import Image.BMP

See Wikipedia for more information about the format.

GIF

Usage :

Import Image.GIF

Supports both static and animated GIFs.

To load an animated GIF, use the following function, TGifImage.LoadImage(url:Object) :

Local image:TImage = TGifImage.LoadImage("image-name.gif")

This function returns a fully populated Max2D TImage object directly (similar to calling LoadAnimImage), rather than a TPixmap. GIF frame delays are stored in the frameDuration:Int[] field of TImage as a time in milliseconds.

See Wikipedia for more information about the format.

IFF/ILBM

Usage :

Import Image.ILBM

See Wikipedia for more information about the format.

JPG

Usage :

Import Image.JPG

See Wikipedia for more information about the format.

PCX

Usage :

Import Image.PCX

See Wikipedia for more information about the format.

PIC

Usage :

Import Image.PIC

See Wikipedia for more information about the format.

PNG

Usage :

Import Image.PNG

See Wikipedia for more information about the format.

PNM

Usage :

Import Image.PNM

See Wikipedia for more information about the format.

QOI

Usage :

Import Image.QOI

See https://qoiformat.org/

RAW

Usage :

Import Image.RAW

See Wikipedia for more information about the format.

SVG

Usage :

Import Image.SVG

See Wikipedia for more information about the format.

TGA

Usage :

Import Image.TGA

See Wikipedia for more information about the format.

WEBP

Usage :

Import Image.WEBP

See Wikipedia for more information about the format.