Images
Tellusim SDK provides efficient implementations for all common image formats. It supports a wide variety of formats including compressed, high dynamic range, layered, and raw images, essential for rendering, simulation, and texture processing.
The Image system supports metadata for JPEG and TIFF formats, including Exif and GeoTIFF attributes.
Support for additional Image formats can be added via the ImageStream interface.
Supported Image Formats
Tellusim Core SDK natively supports the following image formats on all platforms:
-
IMAGE (
*.image
) - Native Tellusim format optimized for fast loading and runtime efficiency. Supports all image features, including layers, mipmaps, and metadata. -
KTX (
*.ktx
) - Khronos texture container format. Supports compressed and uncompressed textures with mipmaps and array layers. -
DDS (
*.dds
) - Microsoft DirectDraw Surface format. Supports compressed textures, mipmaps, cubemaps, and volume textures. -
EXR (
*.exr
) - OpenEXR high dynamic range image format. B44, B44A, DwaA, and DwaB compressions are not supported. -
HDR (
*.hdr
) - Radiance HDR format for high dynamic range images. -
TIFF (
*.tif
,*.tiff
) - Versatile image format supporting multiple layers, channels, and metadata. Supports BigTIFF and GeoTIFF extensions. -
JPEG (
*.jpg
,*.jpeg
) - Widely used lossy compressed image format. Supports single-channel and RGBA images with optional Exif metadata. -
PNG (
*.png
) - Lossless compressed image format with alpha transparency. Supports 8-bit and 16-bit per channel images. -
PSD (
*.psd
) - Adobe Photoshop format supporting layers and masks. Supports 8-bit, 16-bit, and 32-bit images. -
TGA (
*.tga
) - Simple raster format. Supports alpha channel and RLE compression. -
BMP (
*.bmp
) - Bitmap image format. Supports uncompressed and RLE-compressed 8-bit images. -
ICO (
*.ico
) - Icon image format. -
PPM (
*.ppm
) - Portable pixmap format. -
SGI (
*.sgi
,*.rgb
) - Silicon Graphics image format. -
HGT (
*.hgt
) - Heightmap format used for terrain data. -
ARM (
*.arm
) - Compressed texture format using the ARM ASTC encoder.
Plugin Image Formats
The following image formats are supported via plugins:
- WEBP (
*.webp
) - Image format developed by Google. Supports lossy and lossless compression with alpha transparency and animation.
Example
#include <format/TellusimImage.h>
// Create image
Image image;
image.create2D(FormatRf32, size);
// Create read-write sampler
ImageSampler sampler(image);
// Parallel image processing
for(uint32_t y = 0; y < sampler.getHeight(); y += step) {
async.append(async.run([&](uint32_t y0, uint32_t y1) {
for(uint32_t y = y0; y < y1; y++) {
for(uint32_t x = 0; x < sampler.getWidth(); x++) {
ImageColor color = some_complex_function(x, y);
sampler.set2D(x, y, color);
}
}
}, y, min(y + step, sampler.getHeight())));
}
async.wait();
// Save image
image.save("result.image");