silkscreen 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,7 @@ module Silkscreen
34
34
  end
35
35
  else
36
36
  canvas = ChunkyPNG::Image.from_blob img
37
- canvas.crop! 0, 0, window_width, window_height
37
+ canvas.crop! 0, 0, [window_width, canvas.width].min, [window_height, canvas.height].min
38
38
  canvas = resize_canvas(canvas, options[:max_width], options[:max_height])
39
39
  img = canvas.to_s
40
40
  end
@@ -61,7 +61,7 @@ module Silkscreen
61
61
  lower_ratio = [width_ratio, height_ratio].min
62
62
  new_width = (canvas.width * lower_ratio).round
63
63
  new_height = (canvas.height * lower_ratio).round
64
- canvas.resize new_width, new_height
64
+ canvas.resample_bilinear new_width, new_height
65
65
  end
66
66
  end
67
67
  end
@@ -1,3 +1,3 @@
1
1
  module Silkscreen
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silkscreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: