Skip to content

Commit

Permalink
add -sharpen 2 to convert command line
Browse files Browse the repository at this point in the history
  • Loading branch information
drpentode committed Nov 19, 2009
1 parent 0e181a2 commit 2cd6a05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions attachment_on_the_fly.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{attachment_on_the_fly}
s.version = "0.0.3"
s.version = "0.0.4"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jeff Sutherland"]
s.date = %q{2009-11-04}
s.date = %q{2009-11-19}
s.description = %q{A Paperclip mix-in to allow auto-generation of resized images}
s.email = %q{jefferey.sutherland@gmail.com}
s.extra_rdoc_files = [
Expand Down
6 changes: 3 additions & 3 deletions lib/attachment_on_the_fly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ def generate_image(kind, height = 0, width = 0)

if kind == "height"
# resize_image infilename, outfilename , 0, height
`convert -colorspace RGB -geometry x#{height} -quality 100 #{original} #{newfilename} 2>&1 > /dev/null`
`convert -colorspace RGB -geometry x#{height} -quality 100 -sharpen 2 #{original} #{newfilename} 2>&1 > /dev/null`
elsif kind == "width"
# resize_image infilename, outfilename, width
`convert -colorspace RGB -geometry #{width} -quality 100 #{original} #{newfilename} 2>&1 > /dev/null`
`convert -colorspace RGB -geometry #{width} -quality 100 -sharpen 2 #{original} #{newfilename} 2>&1 > /dev/null`
elsif kind == "both"
# resize_image infilename, outfilename, height, width
`convert -colorspace RGB -geometry #{height}x#{height} -quality 100 #{original} #{newfilename} 2>&1 > /dev/null`
`convert -colorspace RGB -geometry #{height}x#{height} -quality 100 -sharpen 2 #{original} #{newfilename} 2>&1 > /dev/null`
end

return new_path
Expand Down

0 comments on commit 2cd6a05

Please sign in to comment.