Module RFits::Compressible
In: lib/rfits/rfits.rb

A set of routines for setting and retrieving compression characterstics.

Methods

Constants

COMPRESSION_TYPE_MAP = { IO::Proxy::RICE_1 => :rice, IO::Proxy::GZIP_1 => :gzip, IO::Proxy::PLIO_1 => :plio, IO::Proxy::HCOMPRESS_1 => :hcompress
COMPRESSION_DIM_KEY = 'ZNAXIS'
COMPRESSION_TYPE_KEY = 'ZCOMPTYPE'
COMPRESSION_TILE_KEY_ROOT = 'ZTILE'
COMPRESSION_VAR_KEY_ROOT = 'ZNAME'
COMPRESSION_VAR_VAL_ROOT = 'ZVAL'
COMPRESSION_NOISE_BIT_NAME_VALUE = 'NOISEBIT'
COMPRESSION_SCALE_NAME_VALUE = 'SCALE'
COMPRESSION_SMOOTH_NAME_VALUE = 'SMOOTH'

Public Instance methods

Activate compression on the image. "options" is a hash with the following keys:

:compression_type
the type of compression (:rice, :gzip, :plio, :hcompress). Required.
:tile_dim
the size of the tiles used in compression. Optional.
:noise_bits
applicable for floating point images only. Optional.
:hcomp_scale
scale factor for use in hcompress compression. Optional.
:hcomp_smooth
smoothing factor for use in hcompress compression. Optional.

Retrieve the compression type of the image. Possible values: :rice, :gzip, :plio, :hcompress

Set the compression type of the image. Possible values: :rice, :gzip, :plio, :hcompress

 image.compression_type = :gzip

Turn off compression for the image.

Get the hcompress scale if the image is compressed using hcompress.

Set the hcompress scale if the image is compressed using hcompress.

Get the hcompress smoothing factor if the image is compressed using hcompress.

Set the hcompress smoothing factor if the image is compressed using hcompress.

Get the noise bits for the compressed image.

Set the noise bits for the compressed image.

Get the tile dimensions for the compressed image.

Set the tile dimensions for the compressed image.

 image.tile_dim = [5, 5]

[Validate]