Sha256: 8c7d0c09674e7c6b3e29e5ab8a351571a9e97a3062e86b6442633425b4524f9c

Contents?: true

Size: 651 Bytes

Versions: 7

Compression:

Stored size: 651 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.7 lib/tensor_stream/images.rb
tensor_stream-1.0.6 lib/tensor_stream/images.rb
tensor_stream-1.0.5 lib/tensor_stream/images.rb
tensor_stream-1.0.4 lib/tensor_stream/images.rb
tensor_stream-1.0.3 lib/tensor_stream/images.rb
tensor_stream-1.0.2 lib/tensor_stream/images.rb
tensor_stream-1.0.1 lib/tensor_stream/images.rb