refactor rgb565

This commit is contained in:
Ishotihadus
2018-05-27 04:31:10 +09:00
parent 71dd94b76f
commit ac7b0a2806
3 changed files with 12 additions and 16 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ module Mikunyan
# @param [Symbol] endian endianness of binary
# @return [ChunkyPNG::Image] decoded image
def self.decode_rgb565(width, height, bin, endian = :big)
ChunkyPNG::Image.from_rgb_stream(width, height, DecodeHelper.decode_rgb565(bin, width * height, endian == :big)).flip
ChunkyPNG::Image.from_rgba_stream(width, height, DecodeHelper.decode_rgb565(bin, width * height, endian == :big)).flip
end
# Decode image from A8 binary