Author Topic: BatchFormatConversion output hint to compress xisf files  (Read 2941 times)

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
BatchFormatConversion output hint to compress xisf files
« on: 2015 December 16 12:24:31 »
Hi,

I'm trying to batch transform my images to xisf format with compression, since it has the greatest compression I could find.

But what are the output hints to compress the images?.

Regards,
Manuel.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: BatchFormatConversion output hint to compress xisf files
« Reply #1 on: 2015 December 17 01:47:21 »
Hi Manuel,

Here are the compression hints currently supported by XISF:

      compression-codec <codec>

Enables compression and selects the specified compression codec. Currently supported codecs are:

      zlib
      lz4
      lz4hc
      zlib+sh
      lz4+sh
      lz4hc+sh


where the '+sh' postfix enables byte shuffling for 16, 32 and 64-bit data blocks (ignored for 8-bit blocks). The default compression codec is zlib. The best option for images is usually zlib+sh.

      compress-data

Enables data compression with the zlib algorithm. This hint is deprecated. It is equivalent to "compression-codec zlib".

      no-compression

Disables data compression.

      compression-level <n>

Selects a compression level. <n> is a positive integer in the range [0,100]. Higher levels tend to yield higher compression ratios. A value of zero lets XISF select a default level for each compression codec, which generally is a good compromise between compression ratio and speed. The default level is zero.


For a complete list of supported codecs with up-to-date information, see the corresponding source code on the GitHub repository:

https://github.com/PixInsight/PCL/blob/master/src/modules/file-formats/XISF/XISFInstance.cpp

A source code comment with all hints is at line #66.
« Last Edit: 2015 December 17 01:53:01 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: BatchFormatConversion output hint to compress xisf files
« Reply #2 on: 2015 December 17 03:08:12 »
Many thanks Juan!

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: BatchFormatConversion output hint to compress xisf files
« Reply #3 on: 2015 December 18 03:08:31 »
Hi Juan,

I haven't been able to make it work. I'm using:

compression-codec zlib+sh compression-level 0

Is that right?

Regards,
Manuel.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: BatchFormatConversion output hint to compress xisf files
« Reply #4 on: 2015 December 18 06:51:30 »
Actually, you have discovered a bug in the XISF format support module (some output hints were not applied). This bug has prevented the immediate release of version 1.8.4.1195 of PixInsight. The installation packages were already on the server; I am rebuilding all of them right now. Thank you for discovering this problem.

This bug is now fixed, so please wait until I release build 1195 in a few hours. Of course your hints string is correct and will work in the new version. Sorry for the inconvenience.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: BatchFormatConversion output hint to compress xisf files
« Reply #5 on: 2015 December 21 12:09:03 »
Actually, you have discovered a bug in the XISF format support module (some output hints were not applied). This bug has prevented the immediate release of version 1.8.4.1195 of PixInsight. The installation packages were already on the server; I am rebuilding all of them right now. Thank you for discovering this problem.

This bug is now fixed, so please wait until I release build 1195 in a few hours. Of course your hints string is correct and will work in the new version. Sorry for the inconvenience.

Thanks, now it works fine!.