GIF & PNG codecs .LDG

Libraries using the LDG system, the GIFLib and the LibPNG.

  • GIF codec is used by:
    P2SM (since 1.4) to load/save GIF static images more quickly, to handle transparency and animations.
    MapEdit to handle GIF files,
    – and its MAKE_MAP tool to slice a large GIF image into tiles and map,
    Other applications and games can use it, please read the HYP guide and P2SM GFA sources (gifdec_*/gifenc_* functions) as exemple.

    Purpose for the GIF decoder is to obtain color table and 2d width*height array raw colors indexes data of the image (=rasterbits, =chunky mode). This avoids c2p+p2c two steps convertions in P2SM image tool, thus quicker. This is also convenient for games to load sprites, recolor them as wanted, and avoid to convert from TC24 bitmap (generated by classic decoders) downto 16/256 colors.

  • PNG codec is used by:
    MapEdit (since 1.3) to handle PNG files,
    – and its MAKE_MAP (since 1.2) tool to slice a large PNG image into tiles and map,
    Other applications and games can use it, please read the HYP guide and MapEdit GFA sources (pngdec_*/pngenc_* functions) as exemple.

    Purpose of this PNG decoder is to handle APNG specifications, meaning like GIF89a, animations are possible, storing several frames into one only file. Convenient for tileset store.

Here are listed versions for 68K, 68020-060 and ColdFire V4e using cross-compilation and the mintlib. Safe LDG.PRG is provided to install TSR ldg functions and the ‘LDGM’ cookie needed for my applications.

Archives Size Date Notes
English 68K 020-060 CFv4e ~500 KB 12-08-2025 release 4
C Sources or on github 646 KB from GIFLib 5.1.1 and LibPNG 1.8.0
HYP guides 10 KB how-to use these LDG

Online gifdec.hyp and pngdec.hyp guides.

4 réflexions sur « GIF & PNG codecs .LDG »

  1. GIF, release 4:

    • mod: simplified API, the GIFFileType object is handled internally.
    • fix: modified GIFLIB, based on 5.1.1, with changes on memory functions, that seems to be finally stable under MagiC.

    PNG, release 1:

    • new: based on 1.8.0 version of LIBPNG.
  2. Changes in the release 3:

    • fix: remove libshare.a use, due to RAM excessive consumption. Thus unstable under MagiC -> either use release 2, either run your setup under FreeMiNT.

Les commentaires sont fermés.