class ImageProcessing::Pipeline
def handle_destination
empty destination file they created, so this method makes sure it is
In case of processing errors, both libvips and imagemagick will leave the
def handle_destination destination_existed = File.exist?(destination) yield rescue File.delete(destination) if File.exist?(destination) && !destination_existed raise end