Menu

#27 Webp image format support

1.0
open
nobody
None
2023-03-21
2023-03-19
G Ajinn
No

Hi,
ASTAP supports a lot of file formats but unfortunately not the webp image format. It's a shame because this format is very efficient in lossless compression, which is perfect for astronomy images.
Would it be possible to add webp format support?

thanks in advance,
best regards,

Discussion

  • han.k

    han.k - 2023-03-21

    Webp was not on my radar. I did some experiments with it and the performance ismuch better then PNG.

    1) To be useful it should support 16bits per colour.
    2) It should be possible to store typical FITS header information like exposure time, date, position and so in the file.

    Currently ASTAP supports FITS and Astro-TIFF files which fulfil above two requirements.

    How do you want to use webp? If lossless compresion is required the it should support the two requirements.I think there is a library for it but it would requires some effort to implement it and is it 16 bit/colour and can I store the header? I'm already glad when people use Astro-Tiff. See https://astro-tiff.sourceforge.io/

    Han

     
  • han.k

    han.k - 2023-03-21

    Meta data is possible in webp. But the format does not support 16 bit/colour or higher. So it is optimized for web but not usable for image archiving. PNG does support 16 bit but not 32 bit or floating point values. Astro-tiff is currently the only lossless compression option with enough bit depth.

    Han

     
  • G Ajinn

    G Ajinn - 2023-03-21

    Hi
    My use is only for archiving astro images with efficient and lossless compression. On this point png is not great...
    I read : "The WebP format uses 8 bits for each of three color channels. The format also uses 8 bits for alpha channel and supports 0~255 levels of opacity". So 32bits in total. It's not bad.

    It's not perfect, but it's interesting nonetheless. For exemple, Siril when it compresses the fits removes voluntarily the bit length to be able to compress efficiently. It is unfortunately an obligation to reduce the files size.

    It also advantageously replaces jpeg files but it corresponds less to my use...
    Like jpeg, it would be nice to be able to open webp files in astap.

    I will look at the astrotiff solution. I only must choose the tif file format in siril?

    Regards,

     

    Last edit: G Ajinn 2023-03-21

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.