teaas 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3098f05416cee548414bbf1641777a458c11972f
4
- data.tar.gz: c147b163841ff68b6801aff1050abf8806d8caea
3
+ metadata.gz: 39ad7c50dd5f51145ba9cfdc088909a8125a48a5
4
+ data.tar.gz: c677973b6901b8102aaf86cb64825e3074556a8d
5
5
  SHA512:
6
- metadata.gz: 2e7e7e26b71e1edd77ad559dd8a842cabfd2cd71dc905fb1d309046269237919b330494db4f0a86745508e66eaf986c90069c00a42e8dab1566a4c4c41590db1
7
- data.tar.gz: 44a3083502b2310474dbc3b5ca0d5f8256b0c2b1bb9fa8c619dc7437affdbd09d7c43509bebab7e570e9644bfb140726861514ab71565d4bc42332cd8b3d6ffd
6
+ metadata.gz: 85dd22ff6614c0167b5240bcbfac27b8f2f3744428cad84cc29a7c3c4a28cb7b9a96fdac1deea49dfe576a73b1df7dddd342afff8dab3f2b7d74260eec8f2fb3
7
+ data.tar.gz: 4707bb6253ea504b30233ee84befc124722b05b4efd8a3303b5113d879ba63f5a51dd1618f79fad709f7513a61f5fea85011798e1b283f99cba161cc832e5748
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.2.2
4
+ * Improve marquee image capability
5
+
3
6
  ## 0.2.1
4
7
  * Add ability to generate marquee images
5
8
 
data/README.md CHANGED
@@ -27,8 +27,6 @@ Making an image a marquee involves taking a static image, and making intermediat
27
27
 
28
28
  **NOTE**: Marquee removes any transparency from the image.
29
29
 
30
- **NOTE**: Marquee does not work on all images right now. This initial version works best on small images that make sense to be converted into a marquee. Larger images might not work as expected.
31
-
32
30
  ## Documentation
33
31
  Docs are in [YARD](http://yardoc.org/) format. To build the HTML docs, just `gem install yard` then run `yard`. If you'd rather not use YARD, you can just read the documentation for the methods in the source files.
34
32
 
data/lib/teaas/marquee.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Teaas
2
2
  class Marquee
3
3
 
4
- # Takes in an image, rolls it 25%, 50%, 75%, and 100%, then returns an animated marquee image. Best when used with {Teaas::Turboize.turbo} to generate multiple marquee speeds.
4
+ # Takes in an image, rolls it 20%, 40%, 60%, and 80%, then returns an animated marquee image. Best when used with {Teaas::Turboize.turbo} to generate multiple marquee speeds.
5
5
  #
6
6
  # @param original_img [Magick::ImageList] The image to be created into a marquee
7
7
  # @return [Magick::ImageList] The marquee image
@@ -10,16 +10,18 @@ module Teaas
10
10
  img = original_img.flatten_images
11
11
  img.format = "gif"
12
12
 
13
+ img_width = img.columns
14
+
13
15
  marquee_image << img
14
- marquee_image << img.roll(25, 0)
15
- marquee_image << img.roll(50, 0)
16
- marquee_image << img.roll(75, 0)
17
- marquee_image << img.roll(100, 0)
16
+ marquee_image << img.roll(img_width * 0.2, 0)
17
+ marquee_image << img.roll(img_width * 0.4, 0)
18
+ marquee_image << img.roll(img_width * 0.6, 0)
19
+ marquee_image << img.roll(img_width * 0.8, 0)
18
20
 
19
21
  marquee_image
20
22
  end
21
23
 
22
- # Takes in an image, rolls it 25%, 50%, 75%, and 100%, then returns an animated marquee image. Best when used with {Teaas::Turboize.turbo} to generate multiple marquee speeds. This is a wrapper around {Teaas::Marquee.marquee}
24
+ # Takes in an image, rolls it 20%, 40%, 60%, and 80%, then returns an animated marquee image. Best when used with {Teaas::Turboize.turbo} to generate multiple marquee speeds. This is a wrapper around {Teaas::Marquee.marquee}
23
25
  #
24
26
  # @param path [String] Path to the image to be created to a marquee image
25
27
  # @return [Magick::ImageList] The marquee image
data/teaas.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'teaas'
3
- s.version = '0.2.1'
3
+ s.version = '0.2.2'
4
4
  s.licenses = ['MIT']
5
5
  s.summary = "Total Emojis as a Service"
6
6
  s.description = "Gem to manipulate emoji-sized images"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teaas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Rastello