WebP in HiPS?

Thomas Boch thomas.boch at astro.unistra.fr
Tue Mar 4 17:11:12 CET 2025


Dear all,

let me share my experience with WebP for HiPS.

At Bologna IVOA (May 2023), I presented my experiments with having a 
WebP version of the DSS2 Color HiPS (see slides in 
https://wiki.ivoa.net/internal/IVOA/InterOpMay2023Apps/IVOABologna2023-TBoch-Apps1.pdf 
). I achieved a compression factor of 3 w.r.t. JPEG tiles. This has 
never been published as a CDS HiPS product because I was not totally 
happy with the fidelity of the result, as WebP tends to flatten tiles 
with large areas of the same color. And yes, perhaps my quality setting 
was too low.

In retrospect, I realized that WebP was better suited to replace PNG 
tiles than to replace JPEG tiles. Recently, I made some tests and 
generated PNG and WebP tiles for the same data. WebP tiles were smaller 
by a factor 4 than PNG tiles, with no visible difference. Of course, 
this factor will differ according to the input data, but this led me to 
reconsider WebP as valid choice to consider for HiPS lossy compression 
with an alpha channel, as pointed by Markus.

As for WebP support in Java applications: so far, I have only found 
libraries relying on JNI+native libraries. Does anybody know a pure Java 
implementation of a WebP reader and writer?  That would be our preferred 
solution for Aladin Desktop and Hipsgen.

As for AVIF: we have no experience in using this format, and would be 
interested to hear if some colleagues used it in some tools.
Grégory: I guess you are referring to AVIF 10 or 12-bits color encoding 
when mentioning "high-dynamic-range imaging in a compressible format".


Cheers,
Thomas



Le 03/03/2025 à 21:25, Dubois-Felsmann, Gregory P. via apps a écrit :
> Dear colleagues,
>
> A part of the Rubin team that's working on generating HiPS data has expressed interest in using the WebP format for HiPS tiles.  Apparently this has been supported by Aladin Lite since v3.1.0 in August 2023.
>
> However, the HiPS standard's language was not written in a way that seems open to the _replacement_ of JPEG/PNG by WebP.  The way the tile-format metadata in the `properties` file is set up is certainly extensible and compatible with it, but the words in the standard itself are restrictive and prescriptive:
>
> §4.2.1.3 "Three image formats *may* be used to package the HiPS tiles for images: FITS, PNG or JPEG. [...] The tile file extension *must* correspond to the format: .fits for FITS, .jpg for JPEG, .png for PNG.  These extensions *must* be in lowercase."
>
> §4.2.3 "As with image HiPS, the format of each cube frame tiles *may* be FITS, JPEG and/or PNG."
>
> §4.4.1 (properties file):
>
> "7. hips_tile_format: Tile formats – Format: list of different HIPS tiles format supported by the survey, space separated (one or many of “fits”, “jpeg”, “png” for image/cube HiPS and “tsv” for catalog HiPS)"
>
> (Note the inconsistency between the required spelling "jpeg" for hips_tile_format and the requirement to use ".jpg" for file extensions.)
>
> The extension to WebP is obvious, but -- especially because the standard mandates particular spellings and capitalization of the file extensions for the original tile types -- it still should be documented, if extending HiPS is the community's intent.
>
> At the moment I feel that that a WebP-only "HiPS" tree would not be reasonably describable as conformant.
>
> It's not clear whether CDS is already ready to promote this as an extension to HiPS.  WebP isn't mentioned in the master HiPS catalog they maintain, even alongside the other file formats:
>
> https://aladin.cds.unistra.fr/java/nph-aladin.pl?frame=aladinHpxList#hipssky
>
> But, if this is a future direction, may I suggest that CDS issue an IVOA Note documenting the use of WebP in HiPS, and provide the required spelling of the extension in parallel with what was done for the others?  This could go on to be a HiPS 1.0.1, but at least getting it written down in a Note would be helpful to the community.
>
> In the mean time we will assume ".webp".
>
> Also: my colleagues are asking: would you also plan to support AVIF?
>
> Many thanks,
> Gregory


More information about the apps mailing list