Sha256: ce2c65120dd7a965bc96de2b2e015d1a0700f1208fc765e1dad775c10ba4fb7d

Contents?: true

Size: 518 Bytes

Versions: 1

Compression:

Stored size: 518 Bytes

Contents

module TensorStream
  module Images
    extend OpHelper
    extend TensorStream::Utils

    def self.decode_png(contents, channels: 0, dtype: :uint8, name: nil)
      _op(:decode_png, contents, channels: channels, data_type: dtype, name: name)
    end

    def self.encode_png(contents, compression: -1, name: nil)
      check_allowed_types(contents, %i[uint8 uint16])
      contents = convert_to_tensor(contents, dtype: :uint16)
      _op(:encode_png, contents, compression: compression, name: name)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tensor_stream-0.9.5 lib/tensor_stream/images.rb