lib/handsum: renumber quality from 0..=3 to 1..=4
diff --git a/cmd/handsum/main.go b/cmd/handsum/main.go index fc8e09e..2449bc7 100644 --- a/cmd/handsum/main.go +++ b/cmd/handsum/main.go
@@ -42,7 +42,7 @@ bFlag = flag.String("b", "", "") bgFlag = flag.String("bg", "", "") cFlag = flag.String("c", "rgb", "") - qFlag = flag.Int("q", 3, "") + qFlag = flag.Int("q", 4, "") ) func getBFlag() string { @@ -68,7 +68,7 @@ Encode inputs BMP, GIF, JPEG, PNG, TIFF or WEBP and outputs Handsum. Roundtrip is equivalent to encode (to an ephemeral file) and then decode. -For encode or roundtrip, the default color and quality is -c=rgb -q=3 (best +For encode or roundtrip, the default color and quality is -c=rgb -q=4 (best quality; 147 bytes per file) but you can choose a lower setting. The -b or -bg flag sets a background color (in case the input is transparent). For example: @@ -85,7 +85,7 @@ -b or -bg Encoding background color: e.g. red, white, 9c27b0 or #ff8. The default is ff9e9e9e (for -c=1 or -c=3) or 00000000 (for -c=4). -c Encoding color: gray (1), rgb (3, default) or rgba (4). - -q Encoding quality: 0, 1, 2 or 3 (default). + -q Encoding quality: 1, 2, 3 or 4 (default). ` func main() { @@ -106,7 +106,7 @@ case "4", "RGBA", "Rgba", "rgba": color = handsum.ColorRGBA } - quality := handsum.Quality(max(0, min(3, *qFlag))) + quality := handsum.Quality(max(1, min(4, *qFlag))) if (color <= handsum.ColorRGB) && (getBFlag() == "") { *bFlag = "ff9e9e9e" @@ -158,8 +158,8 @@ } return handsum.Encode(w, src, &handsum.EncodeOptions{ - Color: handsum.MakeOptionColor(color), - Quality: handsum.MakeOptionQuality(quality), + Color: color, + Quality: quality, }) }
diff --git a/example/stb-imagedumper/stb-imagedumper.c b/example/stb-imagedumper/stb-imagedumper.c index a77ee24..8ad2a51 100644 --- a/example/stb-imagedumper/stb-imagedumper.c +++ b/example/stb-imagedumper/stb-imagedumper.c
@@ -230,15 +230,15 @@ }; const size_t g_src_len__mona_lisa_21_32_th = 24; -const uint8_t g_src_ptr__mona_lisa_21_32_c3q0_handsum[] = { +const uint8_t g_src_ptr__mona_lisa_21_32_c3q1_handsum[] = { 0xfe, 0xd7, 0x1a, 0x76, 0x8b, 0x9a, 0x76, 0x58, 0x88, 0x99, 0x68, 0xb6, 0x79, 0xaa, 0xa6, 0x86, 0x99, 0x97, 0x63, 0x7b, 0x89, 0x98, 0xb9, 0x59, 0x79, 0x28, 0xb8, 0x88, 0x8a, 0x89, 0x8a, 0x99, 0x98, 0x77, 0x94, 0x98, 0x79, 0x88, 0x88, 0x88, 0x97, 0x79, 0x87, 0x77, 0x88, 0x88, 0x88, 0x98, }; -const size_t g_src_len__mona_lisa_21_32_c3q0_handsum = 48; +const size_t g_src_len__mona_lisa_21_32_c3q1_handsum = 48; -const uint8_t g_src_ptr__mona_lisa_21_32_c3q3_handsum[] = { +const uint8_t g_src_ptr__mona_lisa_21_32_c3q4_handsum[] = { 0xfe, 0xd7, 0x7a, 0x87, 0x76, 0x68, 0x87, 0x75, 0x89, 0x77, 0x8c, 0xb7, 0xc7, 0x9b, 0x78, 0x64, 0x5a, 0x98, 0xb4, 0x79, 0xe6, 0x75, 0x57, 0x8a, 0x84, 0x88, 0x03, 0x86, 0x7a, 0x68, 0x87, 0x76, 0x68, 0xf4, 0x55, 0xe2, @@ -253,7 +253,7 @@ 0xba, 0x86, 0x58, 0x8a, 0x9a, 0xa8, 0x89, 0x9a, 0xa7, 0x79, 0xa9, 0xc8, 0x99, 0x8b, 0x87, }; -const size_t g_src_len__mona_lisa_21_32_c3q3_handsum = 147; +const size_t g_src_len__mona_lisa_21_32_c3q4_handsum = 147; const uint8_t g_src_ptr__mona_lisa_21_32_etc2_pkm[] = { 0x50, 0x4b, 0x4d, 0x20, 0x32, 0x30, 0x00, 0x01, 0x00, 0x18, 0x00, 0x20, @@ -1115,14 +1115,14 @@ g_src_len__mona_lisa_21_32_th, }, { - "«demo»/mona-lisa.21x32.c3q0.handsum", - g_src_ptr__mona_lisa_21_32_c3q0_handsum, - g_src_len__mona_lisa_21_32_c3q0_handsum, + "«demo»/mona-lisa.21x32.c3q1.handsum", + g_src_ptr__mona_lisa_21_32_c3q1_handsum, + g_src_len__mona_lisa_21_32_c3q1_handsum, }, { - "«demo»/mona-lisa.21x32.c3q3.handsum", - g_src_ptr__mona_lisa_21_32_c3q3_handsum, - g_src_len__mona_lisa_21_32_c3q3_handsum, + "«demo»/mona-lisa.21x32.c3q4.handsum", + g_src_ptr__mona_lisa_21_32_c3q4_handsum, + g_src_len__mona_lisa_21_32_c3q4_handsum, }, { "«demo»/mona-lisa.21x32.etc2.pkm",
diff --git a/lib/handsum/handsum.go b/lib/handsum/handsum.go index f18b4d0..3a95e9f 100644 --- a/lib/handsum/handsum.go +++ b/lib/handsum/handsum.go
@@ -15,33 +15,35 @@ // This is a very lossy format for very small thumbnails. Very small in terms // of image dimensions, up to 16×16 pixels, but also in terms of file size. // -// The file format has three color settings (Gray, RGB and RGBA) and four +// The file format has three color settings (1=Gray, 3=RGB and 4=RGBA) and four // quality settings. For any given color-and-quality combination, every Handsum -// image file with those settings is a fixed number of bytes. For color=Gray: +// image file with those settings is a fixed number of bytes. // -// - A quality=0 file is 33 bytes long. -// - A quality=1 file is 51 bytes long. -// - A quality=2 file is 83 bytes long. -// - A quality=3 file is 99 bytes long. +// For color=1, also known as color=Gray: // -// For color=RGB: +// - A quality=1 file is 33 bytes long. +// - A quality=2 file is 51 bytes long. +// - A quality=3 file is 83 bytes long. +// - A quality=4 file is 99 bytes long. // -// - A quality=0 file is 48 bytes long. -// - A quality=1 file is 75 bytes long. -// - A quality=2 file is 123 bytes long. +// For color=3, also known as color=RGB: +// +// - A quality=1 file is 48 bytes long. +// - A quality=2 file is 75 bytes long. +// - A quality=3 file is 123 bytes long. +// - A quality=4 file is 147 bytes long. +// +// For color=4, also known as color=RGBA: +// +// - A quality=1 file is 72 bytes long. +// - A quality=2 file is 99 bytes long. // - A quality=3 file is 147 bytes long. +// - A quality=4 file is 171 bytes long. // -// For color=RGBA: -// -// - A quality=0 file is 72 bytes long. -// - A quality=1 file is 99 bytes long. -// - A quality=2 file is 147 bytes long. -// - A quality=3 file is 171 bytes long. -// -// Every Gray/q0 image file is exactly 48 bytes (384 bits) long. For a 16×16 +// Every Gray/q1 image file is exactly 48 bytes (384 bits) long. For a 16×16 // pixel image, this uses 1.5 bits (0.1875 bytes) per pixel. // -// Every RGB/q3 image file is exactly 147 bytes (1176 bits) long. This uses +// Every RGB/q4 image file is exactly 147 bytes (1176 bits) long. This uses // 4.59375 bits per pixel for a 16×16 pixel image (a 1:1 aspect ratio), or // 6.125 bits per pixel for a 16×12 pixel image (a 4:3 aspect ratio). // @@ -60,10 +62,10 @@ // Luma blocks without explicitly recording the 2 Chroma blocks. // // The color=RGBA payload extends the color=RGB payload with one more 8×8 Alpha -// block. That seventh block is always encoded in 24 bytes (as if quality=3). +// block. That seventh block is always encoded in 24 bytes (as if quality=4). // -// Each 8×8 block is sub-divided into 8×8 (for q0), 4×4 (for q1 and q2) or 2×2 -// (for q3) tiles. DCT (Discrete Cosine Transform) is applied to each tile, +// Each 8×8 block is sub-divided into 8×8 (for q1), 4×4 (for q2 and q3) or 2×2 +// (for q4) tiles. DCT (Discrete Cosine Transform) is applied to each tile, // producing 64, 16, 16 or 4 DCT coefficients (depending on the quality). Only // the 15 (out of 64), 6 (out of 16), 10 (out of 16) or 3 (out of 4) lowest // frequency DCT coefficients are kept for each tile. Lowest frequency means @@ -92,7 +94,7 @@ // tiles are 8×8, 4×4 or 2×2): // // ====== ======== DC ======== ======== AC ======== -// Bucket q0 q1,q2 q3 q0 q1,q2 q3 +// Bucket q1 q2,q3 q4 q1 q2,q3 q4 // // 0x0 -1024 -512 -256 -512 -256 -128 // 0x1 -888 -444 -222 -448 -224 -112 @@ -187,7 +189,7 @@ "\x21\x33\x53\x63" + "\x00\x00\x00\x00" + "\x30\x4B\x7B\x93" + - "\x48\x63\x93\xAB")[(int((c-1)&3)<<2)|int(q&3)]) + "\x48\x63\x93\xAB")[(int((c-1)&3)<<2)|int((q-1)&3)]) } // Color is a Handsum image's color setting, either 1 (Gray), 3 (RGB) or 4 @@ -207,74 +209,52 @@ return 6 } -// OptionColor is an option type, what Rust would call an Option<Color>. -type OptionColor struct { - representation uint8 -} - -// MakeOptionColor returns an option value that is Some(c), instead of the -// OptionColor zero-value, which is None. -func MakeOptionColor(c Color) OptionColor { - if (c == ColorGray) || (c == ColorRGB) || (c == ColorRGBA) { - return OptionColor{representation: 0x80 | uint8(c)} - } - return OptionColor{} -} - -// Quality is a Handsum image's quality setting, from 0 (worst) to 3 (best). +// Quality is a Handsum image's quality setting, from 1 (worst) to 4 (best). // // "Best" is relative to the other settings. In absolute terms, Handsum's image // quality ranges from "potato" (best) to "extremely potato" (worst). type Quality uint8 const ( - QualityWorst = Quality(0) - QualityMediumLow = Quality(1) - QualityMediumHigh = Quality(2) - QualityBest = Quality(3) + QualityWorst = Quality(1) + QualityMediumLow = Quality(2) + QualityMediumHigh = Quality(3) + QualityBest = Quality(4) ) func (q Quality) numberOfCoefficients() int { // 15 (out of 64), 6 (out of 16), 10 (out of 16), 3 (out of 4). - return int("\x0F\x06\x0A\x03"[q&3]) -} - -// OptionQuality is an option type, what Rust would call an Option<Quality>. -type OptionQuality struct { - representation uint8 -} - -// MakeOptionQuality returns an option value that is Some(q), instead of the -// OptionQuality zero-value, which is None. -func MakeOptionQuality(q Quality) OptionQuality { - if (0 <= q) && (q <= 3) { - return OptionQuality{representation: 0x80 | uint8(q)} - } - return OptionQuality{} + return int("\x0F\x06\x0A\x03"[(q-1)&3]) } // EncodeOptions are optional arguments to Encode. The zero value is valid and // means to use the default configuration, encoding to 147 bytes. type EncodeOptions struct { - // Color is the color setting. The None option (the zero OptionColor value) - // means to use the default, ColorRGB. - Color OptionColor + // Color is the color setting. The zero value means to use the default, + // ColorRGB. + Color Color - // Quality is the quality-versus-file-size setting. The None option (the - // zero OptionQuality value) means to use the default, QualityBest. - Quality OptionQuality + // Quality is the quality-versus-file-size setting. The zero value means to + // use the default, QualityBest (which is also the largest file size). + Quality Quality } func (o *EncodeOptions) color() Color { - if (o != nil) && ((o.Color.representation & 0x80) != 0) { - return Color(o.Color.representation & 0x7F) + if o != nil { + switch o.Color { + case ColorGray, ColorRGB, ColorRGBA: + return o.Color + } } return ColorRGB } func (o *EncodeOptions) quality() Quality { - if (o != nil) && ((o.Quality.representation & 0x80) != 0) { - return Quality(o.Quality.representation & 0x7F) + if o != nil { + switch o.Quality { + case QualityWorst, QualityMediumLow, QualityMediumHigh, QualityBest: + return o.Quality + } } return QualityBest } @@ -326,10 +306,10 @@ buf := [fileSizeMax]byte{} buf[0] = Magic0[0] buf[1] = Magic0[1] | uint8((c-1)>>1) - buf[2] = ((uint8(c - 1)) << 7) | ((uint8(q)) << 5) | aspectRatio + buf[2] = ((uint8(c - 1)) << 7) | ((uint8(q - 1)) << 5) | aspectRatio bitOffset := 3 * 8 - encodeBlock := encodeBlockFuncs[q] + encodeBlock := encodeBlockFuncs[(q-1)&3] for i := range c.numberOfBlocks() { bitOffset = encodeBlock(&buf, bitOffset, &dstU8s[i], q.numberOfCoefficients()) } @@ -511,7 +491,7 @@ if !ok { return nil, ErrNotAHandsumFile } - q := Quality((buf[2] >> 5) & 0x03) + q := Quality((buf[2]>>5)&0x03) + 1 if _, err := io.ReadFull(r, buf[fileSizeHeader:fileSize(c, q)]); err != nil { return nil, err } @@ -521,7 +501,7 @@ } bitOffset := 3 * 8 - decodeBlock := decodeBlockFuncs[q] + decodeBlock := decodeBlockFuncs[(q-1)&3] lumaQuadBlockU8 := lowleveljpeg.QuadBlockU8{} bitOffset = decodeBlock(lumaQuadBlockU8[0x00:], 16, &buf, bitOffset, q.numberOfCoefficients()) bitOffset = decodeBlock(lumaQuadBlockU8[0x08:], 16, &buf, bitOffset, q.numberOfCoefficients())
diff --git a/lib/handsum/handsum_test.go b/lib/handsum/handsum_test.go index 5fc64ec..8a5404a 100644 --- a/lib/handsum/handsum_test.go +++ b/lib/handsum/handsum_test.go
@@ -32,11 +32,11 @@ } for _, c := range colors { - for q := Quality(0); q < 4; q++ { + for q := QualityWorst; q <= QualityBest; q++ { buf := &bytes.Buffer{} err := Encode(buf, src, &EncodeOptions{ - Color: MakeOptionColor(c), - Quality: MakeOptionQuality(q), + Color: c, + Quality: q, }) if err != nil { tt.Fatalf("c=%d: q=%d: Encode: %v", c, q, err)
diff --git a/std/handsum/decode_handsum.wuffs b/std/handsum/decode_handsum.wuffs index 23c84a2..8e1a712 100644 --- a/std/handsum/decode_handsum.wuffs +++ b/std/handsum/decode_handsum.wuffs
@@ -23,7 +23,7 @@ width : base.u32[..= 16], height : base.u32[..= 16], color : base.u32[..= 3], // 0=gray, 2=rgb, 3=rgba. - quality : base.u32[..= 3], + quality : base.u32[..= 3], // 0=worst, 3=best. // The call sequence state machine is discussed in // (/doc/std/image-decoders-call-sequence.md).
diff --git a/test/c/std/handsum.c b/test/c/std/handsum.c index 004cc84..ccae045 100644 --- a/test/c/std/handsum.c +++ b/test/c/std/handsum.c
@@ -66,7 +66,7 @@ // ---------------- Handsum Tests const char* // -test_wuffs_handsum_decode_interface_c1q0() { +test_wuffs_handsum_decode_interface_c1q1() { CHECK_FOCUS(__func__); wuffs_handsum__decoder dec; CHECK_STATUS("initialize", @@ -75,11 +75,11 @@ WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED)); return do_test__wuffs_base__image_decoder( wuffs_handsum__decoder__upcast_as__wuffs_base__image_decoder(&dec), - "test/data/bricks-gray.c1q0.handsum", 0, SIZE_MAX, 16, 12, 0xFF040404); + "test/data/bricks-gray.c1q1.handsum", 0, SIZE_MAX, 16, 12, 0xFF040404); } const char* // -test_wuffs_handsum_decode_interface_c1q2() { +test_wuffs_handsum_decode_interface_c1q3() { CHECK_FOCUS(__func__); wuffs_handsum__decoder dec; CHECK_STATUS("initialize", @@ -88,11 +88,11 @@ WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED)); return do_test__wuffs_base__image_decoder( wuffs_handsum__decoder__upcast_as__wuffs_base__image_decoder(&dec), - "test/data/bricks-gray.c1q2.handsum", 0, SIZE_MAX, 16, 12, 0xFF101010); + "test/data/bricks-gray.c1q3.handsum", 0, SIZE_MAX, 16, 12, 0xFF101010); } const char* // -test_wuffs_handsum_decode_interface_c3q1() { +test_wuffs_handsum_decode_interface_c3q2() { CHECK_FOCUS(__func__); wuffs_handsum__decoder dec; CHECK_STATUS("initialize", @@ -101,11 +101,11 @@ WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED)); return do_test__wuffs_base__image_decoder( wuffs_handsum__decoder__upcast_as__wuffs_base__image_decoder(&dec), - "test/data/bricks-color.c3q1.handsum", 0, SIZE_MAX, 16, 12, 0xFF313D58); + "test/data/bricks-color.c3q2.handsum", 0, SIZE_MAX, 16, 12, 0xFF313D58); } const char* // -test_wuffs_handsum_decode_interface_c3q3() { +test_wuffs_handsum_decode_interface_c3q4() { CHECK_FOCUS(__func__); wuffs_handsum__decoder dec; CHECK_STATUS("initialize", @@ -114,7 +114,7 @@ WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED)); return do_test__wuffs_base__image_decoder( wuffs_handsum__decoder__upcast_as__wuffs_base__image_decoder(&dec), - "test/data/bricks-color.c3q3.handsum", 0, SIZE_MAX, 16, 12, 0xFF0B337D); + "test/data/bricks-color.c3q4.handsum", 0, SIZE_MAX, 16, 12, 0xFF0B337D); } const char* // @@ -158,7 +158,7 @@ wuffs_base__io_buffer src = ((wuffs_base__io_buffer){ .data = g_src_slice_u8, }); - CHECK_STRING(read_file(&src, "test/data/mona-lisa.21x32.c3q3.handsum")); + CHECK_STRING(read_file(&src, "test/data/mona-lisa.21x32.c3q4.handsum")); CHECK_STATUS("decode_frame_config #0", wuffs_handsum__decoder__decode_frame_config(&dec, &fc, &src)); @@ -203,10 +203,10 @@ proc g_tests[] = { test_wuffs_handsum_decode_frame_config, - test_wuffs_handsum_decode_interface_c1q0, - test_wuffs_handsum_decode_interface_c1q2, - test_wuffs_handsum_decode_interface_c3q1, - test_wuffs_handsum_decode_interface_c3q3, + test_wuffs_handsum_decode_interface_c1q1, + test_wuffs_handsum_decode_interface_c1q3, + test_wuffs_handsum_decode_interface_c3q2, + test_wuffs_handsum_decode_interface_c3q4, test_wuffs_handsum_decode_truncated_input, #ifdef WUFFS_MIMIC
diff --git a/test/data/49.c3q1.handsum b/test/data/49.c3q2.handsum similarity index 100% rename from test/data/49.c3q1.handsum rename to test/data/49.c3q2.handsum
diff --git a/test/data/49.c3q3.handsum b/test/data/49.c3q4.handsum similarity index 100% rename from test/data/49.c3q3.handsum rename to test/data/49.c3q4.handsum
diff --git a/test/data/49.c4q1.handsum b/test/data/49.c4q2.handsum similarity index 100% rename from test/data/49.c4q1.handsum rename to test/data/49.c4q2.handsum
diff --git a/test/data/49.c4q3.handsum b/test/data/49.c4q4.handsum similarity index 100% rename from test/data/49.c4q3.handsum rename to test/data/49.c4q4.handsum Binary files differ
diff --git a/test/data/bricks-color.c3q0.handsum b/test/data/bricks-color.c3q0.handsum deleted file mode 100644 index b98deb9..0000000 --- a/test/data/bricks-color.c3q0.handsum +++ /dev/null
@@ -1 +0,0 @@ -þ×¼§H¨uxºh{ixH{xwv»§¬©Y§SV´§v \ No newline at end of file
diff --git a/test/data/bricks-color.c3q1.handsum b/test/data/bricks-color.c3q1.handsum index c8d36fc..b98deb9 100644 --- a/test/data/bricks-color.c3q1.handsum +++ b/test/data/bricks-color.c3q1.handsum
@@ -1 +1 @@ -þ×+UÚ7 ¦hÔ{¼CDy§´z¦weºÔÕ&mYæRihåSz¶úk¦»{TÚêIÍpoÕ¨ãSË6 ðb \ No newline at end of file +þ×¼§H¨uxºh{ixH{xwv»§¬©Y§SV´§v \ No newline at end of file
diff --git a/test/data/bricks-color.c3q2.handsum b/test/data/bricks-color.c3q2.handsum index 17a4bdf..c8d36fc 100644 --- a/test/data/bricks-color.c3q2.handsum +++ b/test/data/bricks-color.c3q2.handsum
@@ -1 +1 @@ -þ×KUÚ7 h¦hiÔ{¼ªCDy§´zx¦weºyÔÕ&mYxæRihxåSz¶yúk¦gZ»{§TÚÇêIÍepoº·Õ¨ãKSË6Y ðbo \ No newline at end of file +þ×+UÚ7 ¦hÔ{¼CDy§´z¦weºÔÕ&mYæRihåSz¶úk¦»{TÚêIÍpoÕ¨ãSË6 ðb \ No newline at end of file
diff --git a/test/data/bricks-color.c3q3.handsum b/test/data/bricks-color.c3q3.handsum index 614e4bf..17a4bdf 100644 --- a/test/data/bricks-color.c3q3.handsum +++ b/test/data/bricks-color.c3q3.handsum Binary files differ
diff --git a/test/data/bricks-color.c3q4.handsum b/test/data/bricks-color.c3q4.handsum new file mode 100644 index 0000000..614e4bf --- /dev/null +++ b/test/data/bricks-color.c3q4.handsum Binary files differ
diff --git a/test/data/bricks-gray.c1q0.handsum b/test/data/bricks-gray.c1q0.handsum deleted file mode 100644 index e68b300..0000000 --- a/test/data/bricks-gray.c1q0.handsum +++ /dev/null
@@ -1 +0,0 @@ -þÖs¬¦zx(sw¹xyx(xww \ No newline at end of file
diff --git a/test/data/bricks-gray.c1q1.handsum b/test/data/bricks-gray.c1q1.handsum index e01e328..e68b300 100644 --- a/test/data/bricks-gray.c1q1.handsum +++ b/test/data/bricks-gray.c1q1.handsum
@@ -1 +1 @@ -þÖ+cÚ%xÒ{ËaRy¨²z£wRªÂÅw4lhÔShxÓ{ay§ \ No newline at end of file +þÖs¬¦zx(sw¹xyx(xww \ No newline at end of file
diff --git a/test/data/bricks-gray.c1q2.handsum b/test/data/bricks-gray.c1q2.handsum index fbe205a..e01e328 100644 --- a/test/data/bricks-gray.c1q2.handsum +++ b/test/data/bricks-gray.c1q2.handsum
@@ -1 +1 @@ -þÖKcÚ%hxxÒ{˪aRy¨²zx£wRªyÂÅw4lhxÔShxxÓ{ay§y \ No newline at end of file +þÖ+cÚ%xÒ{ËaRy¨²z£wRªÂÅw4lhÔShxÓ{ay§ \ No newline at end of file
diff --git a/test/data/bricks-gray.c1q3.handsum b/test/data/bricks-gray.c1q3.handsum index 3c26d88..fbe205a 100644 --- a/test/data/bricks-gray.c1q3.handsum +++ b/test/data/bricks-gray.c1q3.handsum
@@ -1 +1 @@ -þÖkrMø©ðr458¶9«b)ªs8{¡ô( Â&{(vt¡(Öq)¡(T(rDD©h¤!MQKÉ[qH®¥«(bt,I \ No newline at end of file +þÖKcÚ%hxxÒ{˪aRy¨²zx£wRªyÂÅw4lhxÔShxxÓ{ay§y \ No newline at end of file
diff --git a/test/data/bricks-gray.c1q4.handsum b/test/data/bricks-gray.c1q4.handsum new file mode 100644 index 0000000..3c26d88 --- /dev/null +++ b/test/data/bricks-gray.c1q4.handsum
@@ -0,0 +1 @@ +þÖkrMø©ðr458¶9«b)ªs8{¡ô( Â&{(vt¡(Öq)¡(T(rDD©h¤!MQKÉ[qH®¥«(bt,I \ No newline at end of file
diff --git a/test/data/bricks-gray.c3q3.handsum b/test/data/bricks-gray.c3q4.handsum similarity index 100% rename from test/data/bricks-gray.c3q3.handsum rename to test/data/bricks-gray.c3q4.handsum
diff --git a/test/data/mona-lisa.21x32.c3q0.handsum b/test/data/mona-lisa.21x32.c3q1.handsum similarity index 100% rename from test/data/mona-lisa.21x32.c3q0.handsum rename to test/data/mona-lisa.21x32.c3q1.handsum
diff --git a/test/data/mona-lisa.21x32.c3q3.handsum b/test/data/mona-lisa.21x32.c3q4.handsum similarity index 100% rename from test/data/mona-lisa.21x32.c3q3.handsum rename to test/data/mona-lisa.21x32.c3q4.handsum
diff --git a/test/nia-checksums-of-data.txt b/test/nia-checksums-of-data.txt index 3685ece..3e531f0 100644 --- a/test/nia-checksums-of-data.txt +++ b/test/nia-checksums-of-data.txt
@@ -4,10 +4,10 @@ OK. c3528d19 test/data/49.bn8.nie OK. e3bae566 test/data/49.bp4.nie OK. c3528d19 test/data/49.bp8.nie -OK. bf3fd567 test/data/49.c3q1.handsum -OK. 7cac72e5 test/data/49.c3q3.handsum -OK. b8e18bd1 test/data/49.c4q1.handsum -OK. 295c387a test/data/49.c4q3.handsum +OK. bf3fd567 test/data/49.c3q2.handsum +OK. 7cac72e5 test/data/49.c3q4.handsum +OK. b8e18bd1 test/data/49.c4q2.handsum +OK. 295c387a test/data/49.c4q4.handsum OK. f2a0a3f6 test/data/49.png OK. d3bb0beb test/data/DCI-P3-D65.icc OK. 646e081a test/data/animated-red-blue.000000.nie @@ -56,10 +56,10 @@ OK. d9ce0e57 test/data/artificial-thumbhash/YJqGPQw7sFlslqhFafSE-Q6oJ1h2iHB2Rw.png OK. 4965134c test/data/artificial-thumbhash/YJqGPQw7sFlslqhFafSE-Q6oJ1h2iHB2Rw.th OK. 076cb375 test/data/bricks-color.bmp -OK. 1bb2c55a test/data/bricks-color.c3q0.handsum -OK. 74bb07e1 test/data/bricks-color.c3q1.handsum -OK. 43dd4660 test/data/bricks-color.c3q2.handsum -OK. 79b8bd57 test/data/bricks-color.c3q3.handsum +OK. 1bb2c55a test/data/bricks-color.c3q1.handsum +OK. 74bb07e1 test/data/bricks-color.c3q2.handsum +OK. 43dd4660 test/data/bricks-color.c3q3.handsum +OK. 79b8bd57 test/data/bricks-color.c3q4.handsum OK. bdbbfadb test/data/bricks-color.etc1.pkm OK. 41e6110e test/data/bricks-color.etc1s.pkm OK. 5670f263 test/data/bricks-color.etc2.pkm @@ -75,11 +75,11 @@ OK. f36c2e80 test/data/bricks-dither.no-ancillary.png OK. f36c2e80 test/data/bricks-dither.png OK. c2bce675 test/data/bricks-gray.bmp -OK. 00db551d test/data/bricks-gray.c1q0.handsum -OK. 5c979d98 test/data/bricks-gray.c1q1.handsum -OK. 23430f55 test/data/bricks-gray.c1q2.handsum -OK. 6065d955 test/data/bricks-gray.c1q3.handsum -OK. 6065d955 test/data/bricks-gray.c3q3.handsum +OK. 00db551d test/data/bricks-gray.c1q1.handsum +OK. 5c979d98 test/data/bricks-gray.c1q2.handsum +OK. 23430f55 test/data/bricks-gray.c1q3.handsum +OK. 6065d955 test/data/bricks-gray.c1q4.handsum +OK. 6065d955 test/data/bricks-gray.c3q4.handsum OK. c2bce675 test/data/bricks-gray.gif OK. 3a2478ad test/data/bricks-gray.jpeg OK. c2bce675 test/data/bricks-gray.lossless.webp @@ -141,8 +141,8 @@ OK. ed4b78fc test/data/hippopotamus.regular.gif OK. dcbb225a test/data/hippopotamus.regular.png BAD e4c5926b test/data/hippopotamus.regular.truncated.png -OK. 57441dc9 test/data/mona-lisa.21x32.c3q0.handsum -OK. 39d18fce test/data/mona-lisa.21x32.c3q3.handsum +OK. 57441dc9 test/data/mona-lisa.21x32.c3q1.handsum +OK. 39d18fce test/data/mona-lisa.21x32.c3q4.handsum OK. f6bb81e2 test/data/mona-lisa.21x32.etc2.pkm OK. 012ce4cf test/data/mona-lisa.21x32.lossless.webp OK. 012ce4cf test/data/mona-lisa.21x32.png @@ -200,3 +200,4 @@ OK. 38cb4cbf test/data/red-blue-gradient.vanilla.png OK. 75060601 test/data/rgb24png.bmp OK. 79ab18b6 test/data/ridiculously-fast.png +OK. 4c6d02c3 test/data/transparent-1x1.gif