Class: JXL::Modular::GroupHeader
- Inherits:
-
Data
- Object
- Data
- JXL::Modular::GroupHeader
- Defined in:
- lib/jxl/modular/group_header.rb
Instance Attribute Summary collapse
-
#transforms ⇒ Object
readonly
Returns the value of attribute transforms.
-
#use_global_tree ⇒ Object
readonly
Returns the value of attribute use_global_tree.
-
#weighted ⇒ Object
readonly
Returns the value of attribute weighted.
Class Method Summary collapse
Instance Attribute Details
#transforms ⇒ Object (readonly)
Returns the value of attribute transforms
9 10 11 |
# File 'lib/jxl/modular/group_header.rb', line 9 def transforms @transforms end |
#use_global_tree ⇒ Object (readonly)
Returns the value of attribute use_global_tree
9 10 11 |
# File 'lib/jxl/modular/group_header.rb', line 9 def use_global_tree @use_global_tree end |
#weighted ⇒ Object (readonly)
Returns the value of attribute weighted
9 10 11 |
# File 'lib/jxl/modular/group_header.rb', line 9 def weighted @weighted end |
Class Method Details
.read(reader) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jxl/modular/group_header.rb', line 10 def self.read(reader) use_global_tree = Bit::Field.read_bool(reader) weighted = read_weighted(reader) count = Bit::Field.u32(reader, Bit::Field.val(0), Bit::Field.val(1), Bit::Field.bits_offset(4, 2), Bit::Field.bits_offset(8, 18)) raise ResourceLimitError, "too many modular transforms" if count > 256 transforms = Array.new(count) { read_transform(reader) } new(use_global_tree:, weighted:, transforms:) end |