User:Mihai cartoaje/.ima

.ima is a new open-source image format being developed. It supports lossless and lossy compression, 8 bits and 16 bits unsigned integer and 32 bits floating-point color format, multiple channels, transparency, CMYK color coordinates, Bayer color array, Exif metadata, Adobe XMP metadata and ICC Profiles. Rotation, cropping, brightness and contrast modifications can be done without losing image information.

Transformations
.ima supports an original multiresolution analysis image transformation. The equations for applying it:


 * c^1_2j = ( c^0_2j + c^0_(2j+1) ) /sqrt(2)
 * c^1_(2j+1) = ( - c^0_2j + c^0_(2j+1) ) / sqrt(2)


 * for i > 1,


 * c^i_(2^i j) = ( c^(i-1)_(2^i j) + c^(i-1)_(2^i j + 2^(i-1)) / sqrt(2)
 * c^i_(2^i j + 3*2^(i-2)) = (- c^(i-1)_(2^i j + 2^(i-2)) + c^(i-1)_(2^i j + 3*2^(i-2)) ) / sqrt(2)
 * t1^i_j = ( c^(i-1)_(2^i j + 2^(i-2)) + c^(i-1)_(2^i j + 3*2^(i-2)) ) / sqrt(2)
 * t2^i_j = ( -c^(i-1)_(2^i j) + c^(i-1)_(2^i j + 2^(i-1))) / sqrt(2)
 * c^i_(2^i j + 2^(i-2)) = (2 t1^i_j - t2^i_j) / sqrt(5)
 * c^i_(2^i j + 2^(i-1)) = (t1^i_j + 2 t2^i_j) /sqrt(5)

It also supports the Haar wavelet transformation. The transformation between colorspaces is lossless.

Computational complexity
Compression with the integer version of the original transformation requires an average of 2 multiplications per pixel and no divisions. Compression with the integer version of the Haar transformation requires no multiplications or divisions. Both these transformations require O(log n) of extra memory for decompression, and less than 64 KB for compression in block mode at 24-bit color. The decoding and transformation with the original or Haar transformations is done in one pass through the image.