Is lossless image compression the expected default for image APIs?

46 views
Skip to first unread message

Simon (der_smon)

unread,
Aug 4, 2025, 8:22:13 AMAug 4
to IIIF Discuss
Hello everyone,

I was wondering if the assumption is correct, in order to decide on how to setup the defaults for the Elixir/Erlang library we are working on.

Regards
Simon

Andrew Hankinson

unread,
Aug 4, 2025, 8:31:53 AMAug 4
to iiif-d...@googlegroups.com
Depends what you mean?

For the source files, it varies from raw, uncompressed, lossless TIFF, to TIFF with JPEG compression. For JPEG2000, it can also vary from lossy to lossless, but at least the container and the image format are (mostly) the same. Most servers auto-detect the input file format and react accordingly, though, so I'm not sure what the "defaults" are that you want to set?

For the delivery, the only real choices are JPEG, PNG, or WebP, so it's likely that it's a lossy format.

-Andrew

--
-- You received this message because you are subscribed to the IIIF-Discuss Google group. To post to this group, send email to iiif-d...@googlegroups.com. To unsubscribe from this group, send email to iiif-discuss...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/iiif-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "IIIF Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iiif-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/iiif-discuss/d5691bd3-4d62-4a00-98c9-ec31e795ed70n%40googlegroups.com.

Simon (der_smon)

unread,
Aug 4, 2025, 9:21:11 PMAug 4
to IIIF Discuss

Ah, sorry: I meant the response images. I realised that my bitonal webp images had quite a number of grey pixels because of the lossy compression and wondered if that is considered acceptable as the default.

Robert Casties

unread,
Aug 25, 2025, 5:26:49 AMAug 25
to iiif-d...@googlegroups.com
On 04.08.25 16:05, 'Simon (der_smon)' via IIIF Discuss wrote:
>
> Ah, sorry: I meant the response images. I realised that my bitonal webp
> images had quite a number of grey pixels because of the lossy compression
> and wondered if that is considered acceptable as the default.

Some of the response formats like JPEG and WebP do not really support
bitonal images in the sense that all pixels are either black or white. I
think it is fine to create a bitonal image and feed it to the JPEG or
WebP encoder.

I also think the bitonal option stems from ancient times when
black-and-white images were appreciably smaller and easier to process
than full-color images -- circumstances which doe not really apply any more.

Best
Robert
>> <https://groups.google.com/d/msgid/iiif-discuss/d5691bd3-4d62-4a00-98c9-ec31e795ed70n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
>

--
Dr. Robert Casties -- Digital Humanities Scholar
Max Planck Institute for the History of Science
Boltzmannstr. 22, D-14195 Berlin
Tel: +49/30/22667-342

Samuel Bradshaw

unread,
Aug 25, 2025, 11:19:51 AMAug 25
to iiif-d...@googlegroups.com
WebP also supports lossless compression, so it is possible to have a pure bitonal image (and it's generally smaller than PNG for lossless).
> To view this discussion visit https://groups.google.com/d/msgid/iiif-discuss/83ea5973-0f56-4aab-9aca-3723f5958cf5%40mpiwg-berlin.mpg.de.

Reply all
Reply to author
Forward
0 new messages