albertbellonch/piet — pull request #13 by loureirorg (2013-12-24 02:00:00+00:00)
Title: Bug in filenames with parentheses / Options bypass to command line

There are 2 things in this pull request:

1. Piet.optimize('photo(1)') will fail with an exception, because there's no handling for filenames with spaces, parentheses, and others. I made a simple gsub call to solve this.

2. Sometimes may be needed to pass some options to the command line tool (optipng / optijpeg), so I added the "command_options" option.

Example:
```rails
Piet.optimize("my_photo.jpg", quality: 80, command_options: "--all-progressive")
```

in this case "my_photo.jpg" will be processed by optijpeg with the --all-progressive option, which will generate an interlaced file