Class: Libpng::TextEntry
- Inherits:
-
Struct
- Object
- Struct
- Libpng::TextEntry
- Defined in:
- lib/libpng/text_writer.rb
Overview
One user-supplied text entry, normalized. The encoder decides whether to emit it as tEXt (Latin-1 ASCII) or iTXt (UTF-8 with potentially multibyte characters) based on whether the value contains non-ASCII bytes.
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key
8 9 10 |
# File 'lib/libpng/text_writer.rb', line 8 def key @key end |
#value ⇒ Object
Returns the value of attribute value
8 9 10 |
# File 'lib/libpng/text_writer.rb', line 8 def value @value end |
Instance Method Details
#compression ⇒ Object
9 10 11 |
# File 'lib/libpng/text_writer.rb', line 9 def compression value.ascii_only? ? TEXT_COMPRESSION_NONE : TEXT_COMPRESSION_ITXT_KEY end |