Fast encoder/decoder for the lossless DTM 16 bit image format

Related tags

Image processing dtm
Overview

DTM Image Format

Fast encoder/decoder for the DTM image format.

The DTM image format is a 16-bit lossless image format supporting one to four channels. Its purpose is to serve as a (10x - 20x) faster png alternative with comparable compression.

This format was developed to compress large terrain heightmaps also known as digital terrain models, hence the name.

Example

use dtm::DTM;

fn main() {
    let descriptor1 = DTM {
        pixel_size: 2,
        channel_count: 1,
        width: 16,
        height: 16,
    };
    let data1 = vec![0u16; descriptor1.image_pixel_count()];

    descriptor1.encode_file("image.dtm", &data1).unwrap();
    let (descriptor2, data2) = DTM::decode_file("image.dtm").unwrap();

    assert_eq!(descriptor1, descriptor2);
    assert_eq!(data1, data2);
}

Note

This format is in now way stable or formally specified. I might extend it to support 8 and 32 bit images as well.

License

DTM Image Format is dual-licensed under either

at your option.

You might also like...
Foxtrot is a fast viewer for STEP files, a standard interchange format for mechanical CAD
Foxtrot is a fast viewer for STEP files, a standard interchange format for mechanical CAD

Foxtrot is a fast viewer for STEP files, a standard interchange format for mechanical CAD. It is an experimental project built from the ground up, including new libraries for parsing and triangulation.

Image processing operations

imageproc An image processing library, based on the image library. There may initially be overlap between the functions in this library and those in i

Image Compression Algorithm
Image Compression Algorithm

Image Compression Algorithm 🦭 A new lossless image compression algorithm. In the newest version the algorithm performs rather good, but manages to su

tai (Terminal Ascii Image) tool to convert images to ascii written in Rust
tai (Terminal Ascii Image) tool to convert images to ascii written in Rust

TAI Terminal Ascii Image A tool to convert images to ascii art written in Rust 🦀 Notes This tool is still in development stage. Contributions All Con

Artsy pixel image to vector graphics converter
Artsy pixel image to vector graphics converter

inkdrop inkdrop is an artsy bitmap to vector converter. Command line interface The CLI binary is called inkdrop-cli and reads almost any image bitmap

Automated image compression for efficiently distributing images on the web.

Imager Apparently this project made it into the GitHub Archive Program. About Imager is a tool for automated image compression, and can competitively

Open Graphic Image Writer
Open Graphic Image Writer

Open Graphic Image Writer Documentation You can generate Open Graphic Image dynamically. A CSS-like API. You can generate image by using template imag

Signed distance field font and image command line tool based on OpenCL.

SDFTool Signed distance field font and image command line tool based on OpenCL. Build Windows Run cargo build --release in Visual Studio developer x64

A simple image average color extractor written in 🦀 Rust

A simple image average color extractor written in 🦀 Rust

Comments
  • Decoding benchmark

    Decoding benchmark

    File size comparison:

    | File | Size | Remarks | |--------------|------------|----------------------------------| | N265E425.png | 6'052'200 | | | N265E425.dtm | 31'938'058 | | | N265E425.tif | 16'781'350 | Deflate compression, 4 overviews |

    opened by pka 0
Owner
Kurt Kühnert
Student at the TU Chemnitz
Kurt Kühnert
mico (minimalistic config file format) encoder and decoder

mico This library implements a parser and emitter for mico (minimalistic config file format). Format example: Name: mico Description: minimalistic con

null 1 Jan 30, 2022
Oxipng - a multithreaded lossless PNG compression optimizer

Oxipng Overview Oxipng is a multithreaded lossless PNG compression optimizer. It can be used via a command-line interface or as a library in other Rus

Josh Holmer 1.8k Dec 28, 2022
A quasi-lossless Balkanoidal meta-lingual compressor.

A quasi-lossless Balkanoidal meta-lingual compressor. Background It has long been accepted that Serbian is a compact variant of Russian, with less lib

Emil Koutanov 3 Aug 17, 2022
Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

3top1a 4 Apr 9, 2022
Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes

What is Lust? Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes with scaling in mind.

Harrison Burt 242 Dec 22, 2022
Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Jacob 258 Dec 30, 2022
Rust port of the Quite Okay Image format

qoi_rs What is this? A pretty boring Rust translation of qoi. Status What's there Encode & Decode works Results agree with the C implementation for al

null 9 Dec 9, 2021
Rust library to get image size and format without loading/decoding

imageinfo-rs Rust library to get image size and format without loading/decoding. The imageinfo don't get image format by file ext name, but infer by f

xiaozhuai, Weihang Ding 47 Dec 30, 2022
An experimental gif encoder for Windows 10.

giffun An experimental gif encoder for Windows 10. Resources Based on "Techniques for GPU-based Color Quantization" (2019) by Matthias Trapp, Sebastia

Robert Mikhayelyan 3 Dec 22, 2021
Rust library for fast image resizing with using of SIMD instructions.

fast_image_resize Rust library for fast image resizing with using of SIMD instructions. CHANGELOG Supported pixel formats and available optimisations:

Kirill Kuzminykh 115 Jan 5, 2023