Skip to content

Commit

Permalink
No need to resize unless specified
Browse files Browse the repository at this point in the history
  • Loading branch information
afast committed Jul 31, 2016
1 parent 96bcbcc commit 97d6dc4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions lib/map_print/pdf_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ def print_map
geometry += size[:width].to_s if size[:width]
geometry += 'x'
geometry += size[:height].to_s if size[:height]
end

image = MiniMagick::Image.new(map_image.path)
image.combine_options do |c|
c.density 300
c.resize geometry
c.unsharp '1.5x1+0.7+0.02'
image = MiniMagick::Image.new(map_image.path)
image.combine_options do |c|
c.density 300
c.resize geometry
c.unsharp '1.5x1+0.7+0.02'
end
image.write map_image.path
end
image.write map_image.path

map_image = @context.print_geojson(MiniMagick::Image.new(map_image.path))

Expand Down
14 changes: 7 additions & 7 deletions lib/map_print/png_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ def print_map
geometry += size[:width].to_s if size[:width]
geometry += 'x'
geometry += size[:height].to_s if size[:height]
end

image = MiniMagick::Image.new(map_image.path)
image.combine_options do |c|
c.density 300
c.resize geometry
c.unsharp '1.5x1+0.7+0.02'
image = MiniMagick::Image.new(map_image.path)
image.combine_options do |c|
c.density 300
c.resize geometry
c.unsharp '1.5x1+0.7+0.02'
end
image.write map_image.path
end
image.write map_image.path

map_image = @context.print_geojson(MiniMagick::Image.new(map_image.path))

Expand Down

0 comments on commit 97d6dc4

Please sign in to comment.