magick_round_corners 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +7 -0
- data/README.md +2 -2
- data/lib/magick_round_corners.rb +1 -1
- data/lib/magick_round_corners/transformation.rb +1 -1
- data/lib/magick_round_corners/version.rb +1 -1
- data/magick_round_corners.gemspec +1 -1
- metadata +3 -3
- data/Gemfile.lock +0 -27
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzQ1N2E2NmJkYzhhMjIyODIxZjFhODg3MjdiMzJkMjBlOTg2NWY1NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGZlNTBjMzk5ZjE5MjVmMmQ1MWI5Mjk0MmU0ODkyMmMzOTFhMTU1YQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWUxOTFhZmQxN2Y1ODhlZDU3ZWFhZmI2OWE3ZmFlYWMyNzBkNjJhZmVjNzQx
|
10
|
+
OTY2MzYyMGQ2YTY4MjFmZWU0NDYwMDNjMzRiNTAwNDBjNTQ5YmJkNTJmN2Ji
|
11
|
+
MDk3ZGIzMmQ0MWI4ODkzM2Y4ODBlMDBjMTg4NjdlNmIwN2NkOWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjkwYjA3YmUxMzVjN2I1ZjhmN2MwZTlhMWNjOWZmZjEzMWU2MDAxZTIyOGE4
|
14
|
+
NWI4NmQyMjBiYWFhMzBkODE4MTBkNzkxYTFhMzY3YjQ4MjNlMjU2MTQ2OTFm
|
15
|
+
NDM5MmE5NzcxZjFiMjU0NDBmYmIwYWVlMmYyZTkwZmY0YzVkM2Q=
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Magick Round Corners
|
1
|
+
# Magick Round Corners [![Build Status](https://travis-ci.org/sarcilav/magick_round_corners.png)](https://travis-ci.org/sarcilav/magick_round_corners) [![Code Climate](https://codeclimate.com/github/sarcilav/magick_round_corners.png)](https://codeclimate.com/github/sarcilav/magick_round_corners)
|
2
2
|
|
3
3
|
This is a simple ruby gem that adds the instance method `round_corners`
|
4
4
|
transformation to `Magick::Image` class.
|
@@ -44,6 +44,6 @@ To generate
|
|
44
44
|
:005 > rounded_corners_image.write('output.png')
|
45
45
|
=> sample.png=>output.png PNG 300x300 300x300+0+0 DirectClass 8-bit
|
46
46
|
|
47
|
-
#
|
47
|
+
# Friendly reminder
|
48
48
|
|
49
49
|
When saving/writing out your rounded images, **use** an extension that supports **transparencies** (a.k.a this will not generate rounded jpg images)
|
data/lib/magick_round_corners.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require '
|
1
|
+
require 'RMagick'
|
2
2
|
require 'magick_round_corners/transformation'
|
@@ -9,7 +9,7 @@ module MagickRoundCorners
|
|
9
9
|
# Create a white rectangle with rounded corners. This will become the
|
10
10
|
# mask for the area you want to retain in the original image.
|
11
11
|
::Magick::Draw.new.stroke('none').stroke_width(0).fill('white').
|
12
|
-
roundrectangle(0, 0, columns, rows, radius, radius).
|
12
|
+
roundrectangle(0, 0, columns-1, rows-1, radius, radius).
|
13
13
|
draw(mask)
|
14
14
|
# Apply the mask and write it out
|
15
15
|
composite(mask, ::Magick::CenterGravity, ::Magick::CopyOpacityCompositeOp)
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = %q{A Ruby gem to easily transform images adding round corners.}
|
13
13
|
s.license = "MIT"
|
14
14
|
|
15
|
-
s.
|
15
|
+
s.add_dependency 'rmagick'
|
16
16
|
|
17
17
|
s.add_development_dependency 'rspec'
|
18
18
|
s.add_development_dependency 'bundler'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magick_round_corners
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Arcila Valenzuela
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rmagick
|
@@ -60,8 +60,8 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- .gitignore
|
63
|
+
- .travis.yml
|
63
64
|
- Gemfile
|
64
|
-
- Gemfile.lock
|
65
65
|
- README.md
|
66
66
|
- lib/magick_round_corners.rb
|
67
67
|
- lib/magick_round_corners/transformation.rb
|
data/Gemfile.lock
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
magick_round_corners (1.0)
|
5
|
-
rmagick
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
diff-lcs (1.2.4)
|
11
|
-
rmagick (2.13.2)
|
12
|
-
rspec (2.13.0)
|
13
|
-
rspec-core (~> 2.13.0)
|
14
|
-
rspec-expectations (~> 2.13.0)
|
15
|
-
rspec-mocks (~> 2.13.0)
|
16
|
-
rspec-core (2.13.1)
|
17
|
-
rspec-expectations (2.13.0)
|
18
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
19
|
-
rspec-mocks (2.13.1)
|
20
|
-
|
21
|
-
PLATFORMS
|
22
|
-
ruby
|
23
|
-
|
24
|
-
DEPENDENCIES
|
25
|
-
bundler
|
26
|
-
magick_round_corners!
|
27
|
-
rspec
|