Sha256: 24cdd888ac794f20164996079b9b2df31e24ed7ee2364c7a70eaa056ac390112

Contents?: true

Size: 650 Bytes

Versions: 7

Compression:

Stored size: 650 Bytes

Contents

module TensorStream
  module Images
    extend OpHelper
    extend TensorStream::Utils

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tensor_stream-1.0.0 lib/tensor_stream/images.rb
tensor_stream-1.0.0.pre.rc1 lib/tensor_stream/images.rb
tensor_stream-0.9.10 lib/tensor_stream/images.rb
tensor_stream-0.9.9 lib/tensor_stream/images.rb
tensor_stream-0.9.8 lib/tensor_stream/images.rb
tensor_stream-0.9.7 lib/tensor_stream/images.rb
tensor_stream-0.9.6 lib/tensor_stream/images.rb