Closed
Description
I apologize if this is a very basic question. I'm using ruby-vips in what I think is a very simplistic way to process a few thousand TIFF files and convert them to PNG. It does convert files to PNG but fairly rapidly gobbles up all available memory:
requite 'vips'
for file in Dir.foreach('image_dir') do |filename|
next if File.extname(file) != '.tif'
png = tiff.sub '.tif', '.png'
img = VIPS::Image.new tiff
img.write png
end
Is there something I'm doing wrong here? I noticed that if I comment out the write it is able to successfully read in all the images, so it appears to be caused by writing the PNG file?
Metadata
Metadata
Assignees
Labels
No labels