Module: GDAL::Dataset::InternalFunctions
- Defined in:
- lib/gdal/dataset/internal_functions.rb
Class Method Summary collapse
-
.band_numbers_args(band_numbers) ⇒ Array<FFI::MemoryPointer, Integer>
Makes a pointer of
band_numbers
.
Class Method Details
.band_numbers_args(band_numbers) ⇒ Array<FFI::MemoryPointer, Integer>
Makes a pointer of band_numbers
.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gdal/dataset/internal_functions.rb', line 10 def self.band_numbers_args(band_numbers) band_count = band_numbers&.size || 0 ptr = FFI::MemoryPointer.new(:int, band_count) ptr.write_array_of_int(band_numbers) if band_numbers ptr.autorelease = false [ptr, band_count] end |