pixelart 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pixelart/base.rb +2 -3
- data/lib/pixelart/image.rb +1 -1
- data/lib/pixelart/misc.rb +2 -5
- data/lib/pixelart/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3022f23a6bfd66ef0e1c6f266fe2fd2ad24c802844be57737c2f202988e45292
|
4
|
+
data.tar.gz: b8d11d3128aa897ef91f21dc727f3f9f713a94343142bbeb0cce228dfdba0e6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '086d0b53c8ef6a949025fcd2cda50f505deae181e53bc6cc6241beec8470bbc9f6869a03f189cbf56c6706635e83e16a799dda4e383823dd032a1bb0029717c2'
|
7
|
+
data.tar.gz: 3f577a57cd276d6a9eefdcf5374e5ea69e4f0f8f75cd69957098ec8c051258f70755c0883f8287bcf6e3768e35934bca4863d7ac41f55df7d1ae2395b4e12eed
|
data/lib/pixelart/base.rb
CHANGED
@@ -25,9 +25,8 @@ PixelArt = Pixelart
|
|
25
25
|
module Pixelart
|
26
26
|
Palette256 = Palette8Bit = Palette8bit
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
end
|
28
|
+
Palette256Image = Palette8BitImage = Palette8bitImage =
|
29
|
+
ImagePalette256 = ImagePalette8Bit = ImagePalette8bit
|
31
30
|
end
|
32
31
|
|
33
32
|
|
data/lib/pixelart/image.rb
CHANGED
@@ -98,7 +98,7 @@ PALETTE8BIT = {
|
|
98
98
|
|
99
99
|
def change_palette8bit( palette )
|
100
100
|
## step 0: mapping from grayscale to new 8bit palette (256 colors)
|
101
|
-
color_map = if palette.is_a( String ) || palette.is_a( Symbol )
|
101
|
+
color_map = if palette.is_a?( String ) || palette.is_a?( Symbol )
|
102
102
|
PALETTE8BIT[ palette.to_sym ]
|
103
103
|
## todo/fix: check for missing/undefined palette not found - why? why not?
|
104
104
|
else
|
data/lib/pixelart/misc.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
module Pixelart
|
2
2
|
|
3
3
|
|
4
|
-
class Image
|
5
|
-
class Palette8bit < Image # or use Palette256 alias?
|
4
|
+
class ImagePalette8bit < Image # or use Palette256 alias?
|
6
5
|
def initialize( colors, size: 1, spacing: nil )
|
7
6
|
## todo/check: change size arg to pixel or such? better name/less confusing - why? why not?
|
8
7
|
|
@@ -32,9 +31,7 @@ class Palette8bit < Image # or use Palette256 alias?
|
|
32
31
|
|
33
32
|
super( img.width, img.height, img )
|
34
33
|
end
|
35
|
-
end # class
|
36
|
-
|
37
|
-
end # class Image
|
34
|
+
end # class ImagePalette8bit
|
38
35
|
end # module Pixelart
|
39
36
|
|
40
37
|
|
data/lib/pixelart/version.rb
CHANGED