lib/ddr/derivatives/ptif_generator.rb in ddr-models-2.6.2 vs lib/ddr/derivatives/ptif_generator.rb in ddr-models-2.7.0.rc1
- old
+ new
@@ -22,11 +22,11 @@
end
private
def run_generator(source_to_use)
- command = "vips im_vips2tiff #{Ddr::Utils.file_path(source_to_use)} #{Ddr::Utils.file_path(output)}:#{options}"
+ command = "#{vips_command} im_vips2tiff #{Ddr::Utils.file_path(source_to_use)} #{Ddr::Utils.file_path(output)}:#{options}"
`#{command}`
$?.exitstatus
end
def make_8_bit(tempdir)
@@ -42,9 +42,13 @@
end
end
def source_depth
`identify -quiet -format '%[depth]' #{Ddr::Utils.file_path(source)}[0]`
+ end
+
+ def vips_command
+ Ddr::Models.vips_path ? File.join(Ddr::Models.vips_path, 'vips') : 'vips'
end
end
end
end