pixelchart 1.1.0 → 1.2.0
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 +4 -4
- data/LICENSE.txt +1 -1
- data/bin/pixelchart +6 -7
- data/lib/pixelchart/version.rb +1 -1
- data/lib/pixelchart.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9129a6e4edfeeaeef2f80c67cdf5c7e5d35a30e425f432a4a62a68b9cdd4943d
|
4
|
+
data.tar.gz: 6f9411731b1b14fc0d55978f6903daaaa0cd74d2b897d030782c287ec73d6a28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6374a49217570f9aea5f4a6e43e91f48486c33c5398d4dc507ec5ef8921363ff70c22bb0d132e3e7c8662ca61d5582094f6f34cda889be7a1ea5add11c57082a
|
7
|
+
data.tar.gz: ef7b0d1b87451cb90b536a5c6a509bab1cade6227f8e77b296fc40a6e60402914e3bb3c5cfd5451b546747f5df52f35a93681dad79b1f592ed8b419a016713e1
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2019-
|
3
|
+
Copyright (c) 2019-2023 Alexandre ZANNI
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/bin/pixelchart
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Ruby internal
|
5
|
-
require 'pp'
|
6
5
|
# Project internal
|
7
6
|
require 'pixelchart'
|
8
7
|
# External
|
@@ -41,7 +40,7 @@ DOCOPT
|
|
41
40
|
|
42
41
|
begin
|
43
42
|
args = Docopt.docopt(doc, version: PixelChart::VERSION)
|
44
|
-
|
43
|
+
puts args if args['--debug']
|
45
44
|
Paint.mode = 0 if args['--no-color']
|
46
45
|
if args['draw']
|
47
46
|
data = PixelChart.load_file(args['<input>'])
|
@@ -62,11 +61,11 @@ begin
|
|
62
61
|
end
|
63
62
|
opts[:backend] = args['--backend'].to_sym if args['--backend']
|
64
63
|
if args['--scale']
|
65
|
-
opts[:scale] =
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
64
|
+
opts[:scale] = if /,/.match?(args['--scale']) # dimensions
|
65
|
+
args['--scale'].split(',').map(&:to_i)
|
66
|
+
else # ratio
|
67
|
+
args['--scale'].to_f
|
68
|
+
end
|
70
69
|
end
|
71
70
|
pc = PixelChart.new(data, width, height, opts)
|
72
71
|
pc.draw(filename, opts)
|
data/lib/pixelchart/version.rb
CHANGED
data/lib/pixelchart.rb
CHANGED
@@ -131,7 +131,7 @@ class PixelChart
|
|
131
131
|
opts = { kernel: :nearest }
|
132
132
|
im = im.resize(@scale, **opts)
|
133
133
|
end
|
134
|
-
im.write_to_file(filename, compression: 9, palette: true, colours: 2, Q: 0)
|
134
|
+
im.write_to_file(filename, compression: 9, palette: true, colours: 2, Q: 0, bitdepth: 1)
|
135
135
|
end
|
136
136
|
|
137
137
|
# Check if the argument is an integer else raise an error
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixelchart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre ZANNI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -42,16 +42,22 @@ dependencies:
|
|
42
42
|
name: rmagick
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '4.1'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '6.0'
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - ">="
|
53
56
|
- !ruby/object:Gem::Version
|
54
57
|
version: '4.1'
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '6.0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: ruby-vips
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,17 +102,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
102
|
requirements:
|
97
103
|
- - ">="
|
98
104
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
105
|
+
version: 3.0.0
|
100
106
|
- - "<"
|
101
107
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
108
|
+
version: '4.0'
|
103
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
110
|
requirements:
|
105
111
|
- - ">="
|
106
112
|
- !ruby/object:Gem::Version
|
107
113
|
version: '0'
|
108
114
|
requirements: []
|
109
|
-
rubygems_version: 3.
|
115
|
+
rubygems_version: 3.4.10
|
110
116
|
signing_key:
|
111
117
|
specification_version: 4
|
112
118
|
summary: Create a binary pixel map
|