escpos-image 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -17
- data/escpos-image.gemspec +1 -1
- data/lib/escpos/errors.rb +21 -0
- data/lib/escpos/helpers.rb +1 -0
- data/lib/escpos/image.rb +27 -87
- data/lib/escpos/image_processors/base.rb +23 -0
- data/lib/escpos/image_processors/chunky_png.rb +66 -0
- data/lib/escpos/image_processors/mini_magick.rb +80 -0
- data/test/lib/escpos/image_test.rb +12 -7
- data/test/results/test_image.txt +0 -0
- data/test/results/test_image_conversion.png +0 -0
- data/test/results/test_image_conversion.txt +0 -0
- metadata +12 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d5e07c912a9b88b1f75b69a33954270325f8ff465b89064b88053a596fdd903
|
4
|
+
data.tar.gz: 521eeedfcd527fa8bc2c64f07b868ceb35c07c52757fb5bf80be3741687be446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e054e569dd6c19d3e1314e16f1569c11ef7e5726770e5f991c7bf3405c7b6a5d9891e629e0320f6c71bc7a0961b57041cad0da37fe8e5fd04b279f3dea64c03
|
7
|
+
data.tar.gz: 6472c2f646b0f34de07a8e62df0d9b1e152c5211032a7d2490e90a41cc12e6c76f19da9f70959c3158322d5ef97f6a5a06a1d0eb83a1efd7a95a7ddf0251b5e8
|
data/README.md
CHANGED
@@ -26,28 +26,18 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
@printer = Escpos::Printer.new
|
29
|
-
image = Escpos::Image.new 'path/to/image.png'
|
30
29
|
|
31
|
-
#
|
32
|
-
# Supports all mini_magick formats
|
33
|
-
# Converts the image to monochrome, applies dithering and blends alpha
|
34
|
-
# Requires the mini_magick gem installed
|
30
|
+
# Creating image from path
|
35
31
|
image = Escpos::Image.new 'path/to/image.png', {
|
36
|
-
|
37
|
-
|
38
|
-
extent: true, # default
|
32
|
+
processor: "ChunkyPng" # default or MiniMagick
|
33
|
+
# ... other options, see following sections
|
39
34
|
}
|
40
35
|
|
41
|
-
#
|
42
|
-
|
43
|
-
#
|
44
|
-
image = Escpos::Image.new 'path/to/image.png', {
|
45
|
-
compose_alpha: true, # default
|
46
|
-
compose_alpha_bg: 255, # default, assumes white background
|
47
|
-
}
|
36
|
+
# The MiniMagick processor requires the mini_magick gem installed
|
37
|
+
|
38
|
+
# The constructor also accepts an instance of ChunkyPNG::Image or MiniMagick::Image
|
48
39
|
|
49
|
-
@printer
|
50
|
-
@printer.write image # version 0.0.7 and up
|
40
|
+
@printer << image
|
51
41
|
|
52
42
|
@printer.to_escpos # returns ESC/POS data ready to be sent to printer
|
53
43
|
# on linux this can be piped directly to /dev/usb/lp0
|
@@ -57,6 +47,32 @@ image = Escpos::Image.new 'path/to/image.png', {
|
|
57
47
|
@printer.to_base64 # returns base64 encoded ESC/POS data
|
58
48
|
```
|
59
49
|
|
50
|
+
## Supported formats
|
51
|
+
|
52
|
+
| ChunkyPng | MiniMagick |
|
53
|
+
| --- | --- |
|
54
|
+
| PNG | PNG, JPG, BMP, ... (everything supported by MiniMagick) |
|
55
|
+
|
56
|
+
When using MiniMagick processor, `mini_magick` gem has to be installed or added to the Gemfile, this makes the gem more lightweight by making this dependency optional.
|
57
|
+
|
58
|
+
## Image manipulation
|
59
|
+
|
60
|
+
All options in the following section are optional and opt-in. By default we only take the RGB value from each pixel, average the sum of the components and make the resulting pixel black if the average is under or equal to 128 and white if it is 129 and up.
|
61
|
+
|
62
|
+
## Supported options
|
63
|
+
|
64
|
+
| Option | ChunkyPng | MiniMagick | Possible values | Default | Description |
|
65
|
+
| --- | :---: | :---: | --- | --- | --- |
|
66
|
+
| dither | ❌ | ✅ | true/false | false | Apply [dithering](https://en.wikipedia.org/wiki/Dither) to the image |
|
67
|
+
| rotate | ❌ | ✅ | String | none | Apply rotation, accepts any MiniMagick valid string |
|
68
|
+
| resize | ❌ | ✅ | String | none | Apply resize, accepts any MiniMagick valid string |
|
69
|
+
| grayscale | ✅ | ✅ | true/false | false | Convert image to grayscale (mimics the relative perceptual RGB color sensitivity of the human eye) |
|
70
|
+
| extent | ✅ | ✅ | true/false | false | Scale the image to nice round dimensions divisible by 8 (required unless input image meets it) |
|
71
|
+
| compose_alpha | ✅ | ✅ | true/false | false | Blend alpha into the image (assumes white background by default) |
|
72
|
+
| compose_alpha_bg_r | ✅ | ✅ | 0-255 | 255 | Value of the red component of the background when blending alpha |
|
73
|
+
| compose_alpha_bg_g | ✅ | ✅ | 0-255 | 255 | Value of the green component of the background when blending alpha |
|
74
|
+
| compose_alpha_bg_b | ✅ | ✅ | 0-255 | 255 | Value of the blue component of the background when blending alpha |
|
75
|
+
|
60
76
|
## Contributing
|
61
77
|
|
62
78
|
Bug reports and pull requests are welcome on GitHub at https://github.com/escpos/escpos-image.
|
data/escpos-image.gemspec
CHANGED
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency "minitest", "~> 5.4"
|
26
26
|
spec.add_development_dependency "mini_magick"
|
27
27
|
|
28
|
-
spec.add_dependency "escpos", ">= 0.0.
|
28
|
+
spec.add_dependency "escpos", ">= 0.0.9"
|
29
29
|
spec.add_dependency "chunky_png"
|
30
30
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Escpos
|
2
|
+
|
3
|
+
class DimensionsMustBeMultipleOf8 < ArgumentError
|
4
|
+
def message
|
5
|
+
"Image width and height must be a multiple of 8 or the option \"extent\" must be set to true."
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class InputNotSupported < ArgumentError
|
10
|
+
def message
|
11
|
+
"Image must be a path or an instance of ChunkyPNG::Image or MiniMagick::Image."
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class MiniMagickNotInstalled < LoadError
|
16
|
+
def message
|
17
|
+
"Required options need the mini_magick gem installed: #{e}."
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/lib/escpos/helpers.rb
CHANGED
data/lib/escpos/image.rb
CHANGED
@@ -1,29 +1,30 @@
|
|
1
|
+
require_relative "errors"
|
2
|
+
require_relative "image_processors/chunky_png"
|
3
|
+
require_relative "image_processors/mini_magick"
|
4
|
+
|
1
5
|
module Escpos
|
6
|
+
|
7
|
+
# Images
|
8
|
+
IMAGE = [ 0x1d, 0x76, 0x30, 0x00 ] # Start image pixel data
|
9
|
+
|
2
10
|
class Image
|
3
11
|
|
4
|
-
VERSION = "0.0.
|
12
|
+
VERSION = "0.0.8"
|
5
13
|
|
6
|
-
attr_reader :options
|
14
|
+
attr_reader :processor, :options
|
7
15
|
|
8
16
|
def initialize(image_or_path, options = {})
|
9
17
|
@options = options
|
10
|
-
if image_or_path.is_a?(ChunkyPNG::Image)
|
11
|
-
@image = image_or_path
|
12
|
-
elsif image_or_path.is_a?(String)
|
13
|
-
if options.fetch(:convert_to_monochrome, false)
|
14
|
-
require_mini_magick!
|
15
|
-
image = convert_to_monochrome(image_or_path)
|
16
|
-
@image = ChunkyPNG::Image.from_file(image.path)
|
17
|
-
else
|
18
|
-
@image = ChunkyPNG::Image.from_file(image_or_path)
|
19
|
-
end
|
20
|
-
else
|
21
|
-
raise ArgumentError.new("Image must be a path or a ChunkyPNG::Image object.")
|
22
|
-
end
|
23
18
|
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
processor_klass_name = options.fetch(:processor, "ChunkyPng")
|
20
|
+
processor_klass = ImageProcessors.const_get(processor_klass_name)
|
21
|
+
@processor = processor_klass.new image_or_path, options
|
22
|
+
|
23
|
+
@processor.process!
|
24
|
+
end
|
25
|
+
|
26
|
+
def chunky_png_image
|
27
|
+
processor.chunky_png_image
|
27
28
|
end
|
28
29
|
|
29
30
|
def to_escpos
|
@@ -32,22 +33,15 @@ module Escpos
|
|
32
33
|
i = 0
|
33
34
|
temp = 0
|
34
35
|
|
35
|
-
0.upto(
|
36
|
-
0.upto(
|
37
|
-
px =
|
38
|
-
r, g, b
|
36
|
+
0.upto(chunky_png_image.height - 1) do |y|
|
37
|
+
0.upto(chunky_png_image.width - 1) do |x|
|
38
|
+
px = chunky_png_image.get_pixel(x, y)
|
39
|
+
r, g, b =
|
39
40
|
ChunkyPNG::Color.r(px),
|
40
41
|
ChunkyPNG::Color.g(px),
|
41
|
-
ChunkyPNG::Color.b(px)
|
42
|
-
|
43
|
-
px = (r + b + g) / 3
|
44
|
-
# Alpha is flattened with convert_to_monochrome option
|
45
|
-
handled_by_mini_magick = options.fetch(:convert_to_monochrome, false)
|
46
|
-
if !handled_by_mini_magick && options.fetch(:compose_alpha, true)
|
47
|
-
bg_color = options.fetch(:compose_alpha_bg, 255)
|
48
|
-
a_quot = a / 255.0
|
49
|
-
px = (((1 - a_quot) * bg_color) + (a_quot * px)).to_i
|
50
|
-
end
|
42
|
+
ChunkyPNG::Color.b(px)
|
43
|
+
|
44
|
+
px = (r + b + g) / 3
|
51
45
|
value = px >= 128 ? 255 : 0
|
52
46
|
value = (value << 8) | value
|
53
47
|
temp |= mask if value == 0
|
@@ -64,64 +58,10 @@ module Escpos
|
|
64
58
|
|
65
59
|
[
|
66
60
|
Escpos.sequence(IMAGE),
|
67
|
-
[
|
61
|
+
[ chunky_png_image.width / 8, chunky_png_image.height ].pack("SS"),
|
68
62
|
bits.pack("C*")
|
69
63
|
].join
|
70
64
|
end
|
71
65
|
|
72
|
-
def chunky_png_image
|
73
|
-
@image
|
74
|
-
end
|
75
|
-
|
76
|
-
private
|
77
|
-
|
78
|
-
# !!!
|
79
|
-
# Please note that MiniMagick gem is not required _intentionally_
|
80
|
-
# This makes the gem more lightweight by making this dependency optional
|
81
|
-
# !!!
|
82
|
-
def require_mini_magick!
|
83
|
-
unless defined?(MiniMagick)
|
84
|
-
begin
|
85
|
-
require 'mini_magick'
|
86
|
-
rescue LoadError => e
|
87
|
-
raise "Required options need the mini_magick gem installed: #{e}."
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
def convert_to_monochrome(image_path)
|
93
|
-
image = MiniMagick::Image.open(image_path)
|
94
|
-
|
95
|
-
# Flatten transparency
|
96
|
-
image.flatten
|
97
|
-
|
98
|
-
# Get the first image out of animated gifs
|
99
|
-
image.collapse!
|
100
|
-
|
101
|
-
# Optimise more actions to single call
|
102
|
-
image.combine_options do |c|
|
103
|
-
c.rotate options.fetch(:rotate) if options.has_key?(:rotate)
|
104
|
-
c.resize options.fetch(:resize) if options.has_key?(:resize)
|
105
|
-
c.grayscale 'Rec709Luma'
|
106
|
-
if options.fetch(:dither, true)
|
107
|
-
c.monochrome '+dither'
|
108
|
-
# dither the image with FloydSteinberg algoritm for better results
|
109
|
-
c.dither 'FloydSteinberg'
|
110
|
-
else
|
111
|
-
c.monochrome '+dither' # + operator disables dithering
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
# Limit the extent of the image to nice round numbers
|
116
|
-
if options.fetch(:extent, true)
|
117
|
-
image.extent "#{(image.width/8.0).round*8}x#{(image.height/8.0).round*8}"
|
118
|
-
end
|
119
|
-
|
120
|
-
# Force PNG format so ChunkyPNG works
|
121
|
-
image.format 'png'
|
122
|
-
|
123
|
-
image
|
124
|
-
end
|
125
|
-
|
126
66
|
end
|
127
67
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Escpos
|
2
|
+
module ImageProcessors
|
3
|
+
class Base
|
4
|
+
|
5
|
+
attr_reader :image, :options
|
6
|
+
|
7
|
+
def initialize(image_or_path, options = {})
|
8
|
+
@options = options
|
9
|
+
assert_options!
|
10
|
+
end
|
11
|
+
|
12
|
+
# Require correct dimensions if auto resizing is not enabled
|
13
|
+
def assert_dimensions_multiple_of_8!
|
14
|
+
unless options.fetch(:extent, false)
|
15
|
+
unless image.width % 8 == 0 && image.height % 8 == 0
|
16
|
+
raise DimensionsMustBeMultipleOf8
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require_relative "base"
|
2
|
+
|
3
|
+
module Escpos
|
4
|
+
module ImageProcessors
|
5
|
+
class ChunkyPng < Base
|
6
|
+
|
7
|
+
def initialize(image_or_path, options = {})
|
8
|
+
@image = begin
|
9
|
+
if image_or_path.is_a?(ChunkyPNG::Image)
|
10
|
+
image_or_path
|
11
|
+
elsif image_or_path.is_a?(String)
|
12
|
+
ChunkyPNG::Image.from_file(image_or_path)
|
13
|
+
else
|
14
|
+
raise InputNotSupported
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def chunky_png_image
|
22
|
+
@image
|
23
|
+
end
|
24
|
+
|
25
|
+
def assert_options!
|
26
|
+
assert_dimensions_multiple_of_8!
|
27
|
+
end
|
28
|
+
|
29
|
+
def process!
|
30
|
+
extent = options.fetch(:extent, false)
|
31
|
+
compose_alpha = options.fetch(:compose_alpha, false)
|
32
|
+
grayscale = options.fetch(:extent, false)
|
33
|
+
|
34
|
+
if extent
|
35
|
+
new_width = (image.width / 8.0).round * 8
|
36
|
+
new_height = (image.height / 8.0).round * 8
|
37
|
+
image.resample_nearest_neighbor!(new_width, new_height)
|
38
|
+
end
|
39
|
+
|
40
|
+
return if !compose_alpha && !grayscale
|
41
|
+
|
42
|
+
if compose_alpha
|
43
|
+
bg_r, bg_g, bg_b =
|
44
|
+
options.fetch(:compose_alpha_bg_r, 255),
|
45
|
+
options.fetch(:compose_alpha_bg_g, 255),
|
46
|
+
options.fetch(:compose_alpha_bg_b, 255)
|
47
|
+
end
|
48
|
+
|
49
|
+
0.upto(image.height - 1) do |y|
|
50
|
+
0.upto(image.width - 1) do |x|
|
51
|
+
px = image.get_pixel(x, y)
|
52
|
+
if compose_alpha
|
53
|
+
bg_color = ChunkyPNG::Color.rgb(bg_r, bg_g, bg_b)
|
54
|
+
px = ChunkyPNG::Color.compose_quick(px, bg_color)
|
55
|
+
end
|
56
|
+
if grayscale
|
57
|
+
px = ChunkyPNG::Color.to_grayscale(px)
|
58
|
+
end
|
59
|
+
image.set_pixel(x, y, px)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative "base"
|
2
|
+
|
3
|
+
module Escpos
|
4
|
+
module ImageProcessors
|
5
|
+
class MiniMagick < Base
|
6
|
+
|
7
|
+
def initialize(image_or_path, options = {})
|
8
|
+
require_mini_magick!
|
9
|
+
|
10
|
+
@image = begin
|
11
|
+
if image_or_path.is_a?(::MiniMagick::Image)
|
12
|
+
image_or_path
|
13
|
+
elsif image_or_path.is_a?(String)
|
14
|
+
::MiniMagick::Image.open(image_or_path)
|
15
|
+
else
|
16
|
+
raise InputNotSupported
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
23
|
+
def chunky_png_image
|
24
|
+
ChunkyPNG::Image.from_file @image.path
|
25
|
+
end
|
26
|
+
|
27
|
+
def assert_options!
|
28
|
+
assert_dimensions_multiple_of_8!
|
29
|
+
end
|
30
|
+
|
31
|
+
# MiniMagick gem is not required intentionally
|
32
|
+
# This makes the gem more lightweight by making this dependency optional
|
33
|
+
def require_mini_magick!
|
34
|
+
return if defined?(::MiniMagick)
|
35
|
+
require "mini_magick"
|
36
|
+
rescue LoadError => e
|
37
|
+
raise MiniMagickNotInstalled
|
38
|
+
end
|
39
|
+
|
40
|
+
def process!
|
41
|
+
if options.fetch(:compose_alpha, false)
|
42
|
+
image.combine_options do |c|
|
43
|
+
bg_r, bg_g, bg_b =
|
44
|
+
options.fetch(:compose_alpha_bg_r, 255),
|
45
|
+
options.fetch(:compose_alpha_bg_g, 255),
|
46
|
+
options.fetch(:compose_alpha_bg_b, 255)
|
47
|
+
c.background "rgb(#{bg_r},#{bg_g},#{bg_b})"
|
48
|
+
c.flatten
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Get the first image out of animated gifs
|
53
|
+
image.collapse!
|
54
|
+
|
55
|
+
# Optimise more actions to single call
|
56
|
+
image.combine_options do |c|
|
57
|
+
c.rotate options.fetch(:rotate) if options.has_key?(:rotate)
|
58
|
+
c.resize options.fetch(:resize) if options.has_key?(:resize)
|
59
|
+
|
60
|
+
c.grayscale('Rec709Luma') if options.fetch(:grayscale, false)
|
61
|
+
|
62
|
+
if options.fetch(:dither, false)
|
63
|
+
c.monochrome '+dither'
|
64
|
+
# dither the image with FloydSteinberg algoritm for better results
|
65
|
+
c.dither 'FloydSteinberg'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Limit the extent of the image to nice round numbers
|
70
|
+
if options.fetch(:extent, false)
|
71
|
+
image.extent "#{(image.width/8.0).round*8}x#{(image.height/8.0).round*8}"
|
72
|
+
end
|
73
|
+
|
74
|
+
# Force PNG format so ChunkyPNG works
|
75
|
+
image.format 'png'
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -9,24 +9,29 @@ class ImageTest < Minitest::Test
|
|
9
9
|
image_path = File.join(__dir__, '../../fixtures/tux_mono.png')
|
10
10
|
image = Escpos::Image.new image_path
|
11
11
|
|
12
|
-
@printer
|
13
|
-
@printer
|
12
|
+
@printer << image
|
13
|
+
@printer << "\n" * 10
|
14
14
|
@printer.cut!
|
15
15
|
image.chunky_png_image.metadata = {}
|
16
16
|
image.chunky_png_image.save(File.join(__dir__, "../../results/#{__method__}.png"))
|
17
|
-
|
17
|
+
file = File.join(__dir__, "../../results/#{__method__}.txt")
|
18
|
+
#IO.binwrite file, @printer.to_escpos
|
19
|
+
assert_equal IO.binread(file), @printer.to_escpos
|
18
20
|
end
|
19
21
|
|
20
22
|
def test_image_conversion
|
21
23
|
image_path = File.join(__dir__, '../../fixtures/tux_alpha.png')
|
22
|
-
image = Escpos::Image.new image_path,
|
24
|
+
image = Escpos::Image.new image_path, grayscale: true,
|
25
|
+
compose_alpha: true, extent: true
|
23
26
|
|
24
|
-
@printer
|
25
|
-
@printer
|
27
|
+
@printer << image.to_escpos
|
28
|
+
@printer << "\n" * 10
|
26
29
|
@printer.cut!
|
27
30
|
image.chunky_png_image.metadata = {}
|
28
31
|
image.chunky_png_image.save(File.join(__dir__, "../../results/#{__method__}.png"))
|
29
|
-
|
32
|
+
file = File.join(__dir__, "../../results/#{__method__}.txt")
|
33
|
+
#IO.binwrite file, @printer.to_escpos
|
34
|
+
assert_equal IO.binread(file), @printer.to_escpos
|
30
35
|
end
|
31
36
|
|
32
37
|
end
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escpos-image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Svoboda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.0.
|
75
|
+
version: 0.0.9
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.0.
|
82
|
+
version: 0.0.9
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: chunky_png
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,13 +112,19 @@ files:
|
|
112
112
|
- bin/setup
|
113
113
|
- escpos-image.gemspec
|
114
114
|
- examples/IMG_20160610_232415_HDR.jpg
|
115
|
+
- lib/escpos/errors.rb
|
115
116
|
- lib/escpos/helpers.rb
|
116
117
|
- lib/escpos/image.rb
|
118
|
+
- lib/escpos/image_processors/base.rb
|
119
|
+
- lib/escpos/image_processors/chunky_png.rb
|
120
|
+
- lib/escpos/image_processors/mini_magick.rb
|
117
121
|
- test/fixtures/tux_alpha.png
|
118
122
|
- test/fixtures/tux_mono.png
|
119
123
|
- test/lib/escpos/image_test.rb
|
120
124
|
- test/results/test_image.png
|
125
|
+
- test/results/test_image.txt
|
121
126
|
- test/results/test_image_conversion.png
|
127
|
+
- test/results/test_image_conversion.txt
|
122
128
|
- test/test_helper.rb
|
123
129
|
homepage: https://github.com/escpos/escpos-image
|
124
130
|
licenses:
|
@@ -148,5 +154,7 @@ test_files:
|
|
148
154
|
- test/fixtures/tux_mono.png
|
149
155
|
- test/lib/escpos/image_test.rb
|
150
156
|
- test/results/test_image.png
|
157
|
+
- test/results/test_image.txt
|
151
158
|
- test/results/test_image_conversion.png
|
159
|
+
- test/results/test_image_conversion.txt
|
152
160
|
- test/test_helper.rb
|