Class: Proselytism::Converters::PpmToJpeg

Inherits:
Base
  • Object
show all
Defined in:
lib/proselytism/converters/ppm_to_jpeg.rb

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Methods inherited from Base

#convert, #destination_file_path, #execute

Instance Method Details

#perform(origin, options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/proselytism/converters/ppm_to_jpeg.rb', line 7

def perform(origin, options={})
  destination = origin.gsub(/\..*$/,'.jpg')
  command= "pnmtojpeg #{origin} > #{destination} 2>&1"
  execute command
  destination
end