photo_mosaic 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13f10720acf94a17f2bf43ee60c8a4717b748300bbf12f2204c936ba99230b9a
4
- data.tar.gz: cea9f388cb21808b34651252f6afe6131ec11c1ed30824c2a262eadb1a711bf7
3
+ metadata.gz: 5f7db9f1825c8ea011b24140162b4142ef82072b9d704fa7dcdaa100301e4039
4
+ data.tar.gz: 58d7115186a4aea4d01d284c1b5a0fe90f53e6d4f1512688cbe6a111b06d2c14
5
5
  SHA512:
6
- metadata.gz: 57e8f216f453be8fb30dfbad8d36409a743b659bc51d48e7a5f6a62fe321b6907f3e68459b02b96ecb576b37241e7c5153ed2dbec2d9ef3bab0042f53c4004fe
7
- data.tar.gz: 94b3fdf5ab558cb754f054b7be2a70e3c87ad0e4c5288a49f133d7c48ae3ca53b7b8cfac44eefb9cd1c563fd3b49e859f8f1de7789a6e936314ef7fa410512f0
6
+ metadata.gz: a78549c799456e8585b253f43d7efefeadb3982694fca59fdd2a9d337fdb530d28f74cad7ad239cdc0703c21b0c5ec898bffed163158fb74c82e338c2a8da4ac
7
+ data.tar.gz: 51bdc9d4ba4849adf1aa2e9ec96b183bd82a2322a3968e2e76442ef20f556ba5e813a4fc6230b32962257384ddf01f84be9de2636dd6d44168eea64094d95ded
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.3] - 2021-05-06
3
+ ## [0.1.4] - 2021-05-06
4
4
 
5
5
  - Initial release
@@ -6,7 +6,7 @@ module PhotoMosaic
6
6
  @tile_width = tile_width
7
7
  @tile_height = tile_height
8
8
  @original_image = original_image.shave(original_image.width % tile_width, original_image.height % tile_height)
9
- @tile_images = tile_images.lazy.map { |img| img.fit(tile_width, tile_height) }
9
+ @tile_images = tile_images.map { |img| img.fit(tile_width, tile_height) }
10
10
  end
11
11
 
12
12
  def join_tiles
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PhotoMosaic
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
data/main.rb ADDED
@@ -0,0 +1,11 @@
1
+ require_relative "lib/photo_mosaic"
2
+
3
+ PhotoMosaic.subscribe(PhotoMosaic::ProgressBar.new)
4
+
5
+ PhotoMosaic.create(
6
+ original_image: "/users/axel/pictures/tiger.jpg",
7
+ tile_images: Dir["/users/axel/pictures/flowers/*"],
8
+ output_image: "/users/axel/pictures/tiger_mosaic.png",
9
+ tile_width: 20,
10
+ tile_height: 20
11
+ );
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: photo_mosaic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Axel Molina
@@ -106,6 +106,7 @@ files:
106
106
  - lib/photo_mosaic/mosaic.rb
107
107
  - lib/photo_mosaic/progress_bar.rb
108
108
  - lib/photo_mosaic/version.rb
109
+ - main.rb
109
110
  - photo_mosaic.gemspec
110
111
  - spec/.DS_Store
111
112
  - spec/images/.DS_Store