name = "image_io"
description = "Output in BMP,PPM,QOI;input in BMP,GIF,JPG,PNG,PNM,QOI,TGA"
version = "20240725.0.0"

authors = ["Jeff Carter"]
maintainers = ["Bent Bracke <bent@bracke.dk>"]
maintainers-logins = ["bracke"]
licenses = "BSD-3-Clause"
website = "https://github.com/bracke/Image_IO"
tags = ["image", "io", "bmp", "ppm", "qoi", "gif", "jpg", "png", "pnm", "tga"]

long-description = """
# Image_IO
Output in BMP, PNG, PPM, and QOI formats; input in BMP, GIF, JPG, PNG, PNM, QOI, and TGA formats

Package Image_IO.Operations provides the ability to input and output images.

PNG is a lossless compressed format that is widely supported. Uncompressed BMP is a universal format that is very large. PPM is intended to be a set of portable formats, but lacks support by default on some platforms. QOI is a lossless compressed format, but not widely supported.

Write_P3 uses [PragmARC.Text_IO](https://github.com/jrcarter/PragmARC/blob/Ada-12/pragmarc-text_io.ads) to obtain uniform line terminators across platforms. This can be easily changed to Ada.Text_IO if the line terminators are not a concern.

Write_PNG uses [Z_Compression](https://github.com/jrcarter/Z_Compression) and [CRC-32](https://github.com/jrcarter/CRC-32).

Read is a wrapper around [Generic Image Decoder (GID)](https://github.com/zertovitch/gid) for the most common use: reading an image from a file. GID may be used to decode images from other sources, but that generality makes it complex to use. Read ignores transparency (Alpha channel) and only reads the first frame of an animation.

Pure_RGB is a demo program that reads an image using Read, modifies it to change all color components to the closest of 0 or 255, and outputs the result using Write_PNG. It is invoked with

     pure_rgb <name>

The output name is the input name with ".png" appended. Pure_RGB does no error handling; if the input file name is omitted, doesn't exist, or is not a supported image format, the program will terminate with an unhandled exception.

Image_IO and Pure_RGB have been compiled and tested with GNAT 12.3.0 on Linux and ObjectAda 10.5U7 on Windows.
"""

[build-switches]
"*".style_checks = "No"
"*".ada_version = "Ada12"

[[depends-on]] # Avoid bug in GNAT 13
gnat = "<13.0 | >=13.3"

[[depends-on]]
pragmarc = "^20240323.0.0"

[[depends-on]]
gid = "^13.0.0"

[[depends-on]]
crc_32 = "^20240725.0.0"

[[depends-on]]
z_compression = "^20240724.0.0"

[origin]
commit = "e3fcdc57ed2f868e3ad21aeb3330d23c5ec3dbe5"
url = "git+https://github.com/bracke/Image_IO.git"

