added scan_images.rb (patched)