From 95f89503ced86f119f802557ef9ba4808d5b956b Mon Sep 17 00:00:00 2001 From: Lajos Marton Date: Mon, 21 Oct 2019 23:01:50 +0200 Subject: [PATCH] Some Lossy files added to WebPDecoder Identify test. Test is broken with new sample files. --- ImageSharp.sln | 183 +++++++++++++++--- .../Formats/WebP/WebPDecoderTests.cs | 3 + .../Formats/WebP/WebPMetaDataTests.cs | 11 +- tests/ImageSharp.Tests/TestImages.cs | 12 +- 4 files changed, 169 insertions(+), 40 deletions(-) diff --git a/ImageSharp.sln b/ImageSharp.sln index 4ffb553996..df634863bf 100644 --- a/ImageSharp.sln +++ b/ImageSharp.sln @@ -356,33 +356,159 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Benchmarks", "te EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Sandbox46", "tests\ImageSharp.Sandbox46\ImageSharp.Sandbox46.csproj", "{561B880A-D9EE-44EF-90F5-817C54A9D9AB}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Webp", "Webp", "{7BEE9435-1833-4686-8B36-C4EE2F13D908}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lossy", "Lossy", "{41D10A70-59CE-4634-9145-CE9B60050371}" - ProjectSection(SolutionItems) = preProject - tests\Images\Input\WebP\Lossy\1.webp = tests\Images\Input\WebP\Lossy\1.webp - tests\Images\Input\WebP\Lossy\2.webp = tests\Images\Input\WebP\Lossy\2.webp - tests\Images\Input\WebP\Lossy\3.webp = tests\Images\Input\WebP\Lossy\3.webp - tests\Images\Input\WebP\Lossy\4.webp = tests\Images\Input\WebP\Lossy\4.webp - tests\Images\Input\WebP\Lossy\5.webp = tests\Images\Input\WebP\Lossy\5.webp - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lossless", "Lossless", "{F19E6F18-4102-4134-8A96-FEC2AB67F794}" - ProjectSection(SolutionItems) = preProject - tests\Images\Input\WebP\Lossless\1_webp_ll.webp = tests\Images\Input\WebP\Lossless\1_webp_ll.webp - tests\Images\Input\WebP\Lossless\2_webp_ll.webp = tests\Images\Input\WebP\Lossless\2_webp_ll.webp - tests\Images\Input\WebP\Lossless\3_webp_ll.webp = tests\Images\Input\WebP\Lossless\3_webp_ll.webp - tests\Images\Input\WebP\Lossless\4_webp_ll.webp = tests\Images\Input\WebP\Lossless\4_webp_ll.webp - tests\Images\Input\WebP\Lossless\5_webp_ll.webp = tests\Images\Input\WebP\Lossless\5_webp_ll.webp - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{E6B81E19-B27F-4656-9169-4B8415D064A2}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Webp", "Webp", "{983A31E2-5E26-4058-BD6E-03B4922D4BBF}" ProjectSection(SolutionItems) = preProject - tests\Images\Input\WebP\Lossy\Alpha\1_webp_a.webp = tests\Images\Input\WebP\Lossy\Alpha\1_webp_a.webp - tests\Images\Input\WebP\Lossy\Alpha\2_webp_a.webp = tests\Images\Input\WebP\Lossy\Alpha\2_webp_a.webp - tests\Images\Input\WebP\Lossy\Alpha\3_webp_a.webp = tests\Images\Input\WebP\Lossy\Alpha\3_webp_a.webp - tests\Images\Input\WebP\Lossy\Alpha\4_webp_a.webp = tests\Images\Input\WebP\Lossy\Alpha\4_webp_a.webp - tests\Images\Input\WebP\Lossy\Alpha\5_webp_a.webp = tests\Images\Input\WebP\Lossy\Alpha\5_webp_a.webp + tests\Images\Input\WebP\alpha_color_cache.webp = tests\Images\Input\WebP\alpha_color_cache.webp + tests\Images\Input\WebP\alpha_filter_0_method_0.webp = tests\Images\Input\WebP\alpha_filter_0_method_0.webp + tests\Images\Input\WebP\alpha_filter_0_method_1.webp = tests\Images\Input\WebP\alpha_filter_0_method_1.webp + tests\Images\Input\WebP\alpha_filter_1.webp = tests\Images\Input\WebP\alpha_filter_1.webp + tests\Images\Input\WebP\alpha_filter_1_method_0.webp = tests\Images\Input\WebP\alpha_filter_1_method_0.webp + tests\Images\Input\WebP\alpha_filter_1_method_1.webp = tests\Images\Input\WebP\alpha_filter_1_method_1.webp + tests\Images\Input\WebP\alpha_filter_2.webp = tests\Images\Input\WebP\alpha_filter_2.webp + tests\Images\Input\WebP\alpha_filter_2_method_0.webp = tests\Images\Input\WebP\alpha_filter_2_method_0.webp + tests\Images\Input\WebP\alpha_filter_2_method_1.webp = tests\Images\Input\WebP\alpha_filter_2_method_1.webp + tests\Images\Input\WebP\alpha_filter_3.webp = tests\Images\Input\WebP\alpha_filter_3.webp + tests\Images\Input\WebP\alpha_filter_3_method_0.webp = tests\Images\Input\WebP\alpha_filter_3_method_0.webp + tests\Images\Input\WebP\alpha_filter_3_method_1.webp = tests\Images\Input\WebP\alpha_filter_3_method_1.webp + tests\Images\Input\WebP\alpha_no_compression.webp = tests\Images\Input\WebP\alpha_no_compression.webp + tests\Images\Input\WebP\bad_palette_index.webp = tests\Images\Input\WebP\bad_palette_index.webp + tests\Images\Input\WebP\big_endian_bug_393.webp = tests\Images\Input\WebP\big_endian_bug_393.webp + tests\Images\Input\WebP\bryce.webp = tests\Images\Input\WebP\bryce.webp + tests\Images\Input\WebP\bug3.webp = tests\Images\Input\WebP\bug3.webp + tests\Images\Input\WebP\color_cache_bits_11.webp = tests\Images\Input\WebP\color_cache_bits_11.webp + tests\Images\Input\WebP\grid.bmp = tests\Images\Input\WebP\grid.bmp + tests\Images\Input\WebP\grid.pam = tests\Images\Input\WebP\grid.pam + tests\Images\Input\WebP\grid.pgm = tests\Images\Input\WebP\grid.pgm + tests\Images\Input\WebP\grid.png = tests\Images\Input\WebP\grid.png + tests\Images\Input\WebP\grid.ppm = tests\Images\Input\WebP\grid.ppm + tests\Images\Input\WebP\grid.tiff = tests\Images\Input\WebP\grid.tiff + tests\Images\Input\WebP\libwebp_tests.md5 = tests\Images\Input\WebP\libwebp_tests.md5 + tests\Images\Input\WebP\lossless1.webp = tests\Images\Input\WebP\lossless1.webp + tests\Images\Input\WebP\lossless2.webp = tests\Images\Input\WebP\lossless2.webp + tests\Images\Input\WebP\lossless3.webp = tests\Images\Input\WebP\lossless3.webp + tests\Images\Input\WebP\lossless4.webp = tests\Images\Input\WebP\lossless4.webp + tests\Images\Input\WebP\lossless_big_random_alpha.webp = tests\Images\Input\WebP\lossless_big_random_alpha.webp + tests\Images\Input\WebP\lossless_color_transform.bmp = tests\Images\Input\WebP\lossless_color_transform.bmp + tests\Images\Input\WebP\lossless_color_transform.pam = tests\Images\Input\WebP\lossless_color_transform.pam + tests\Images\Input\WebP\lossless_color_transform.pgm = tests\Images\Input\WebP\lossless_color_transform.pgm + tests\Images\Input\WebP\lossless_color_transform.ppm = tests\Images\Input\WebP\lossless_color_transform.ppm + tests\Images\Input\WebP\lossless_color_transform.tiff = tests\Images\Input\WebP\lossless_color_transform.tiff + tests\Images\Input\WebP\lossless_color_transform.webp = tests\Images\Input\WebP\lossless_color_transform.webp + tests\Images\Input\WebP\lossless_vec_1_0.webp = tests\Images\Input\WebP\lossless_vec_1_0.webp + tests\Images\Input\WebP\lossless_vec_1_1.webp = tests\Images\Input\WebP\lossless_vec_1_1.webp + tests\Images\Input\WebP\lossless_vec_1_10.webp = tests\Images\Input\WebP\lossless_vec_1_10.webp + tests\Images\Input\WebP\lossless_vec_1_11.webp = tests\Images\Input\WebP\lossless_vec_1_11.webp + tests\Images\Input\WebP\lossless_vec_1_12.webp = tests\Images\Input\WebP\lossless_vec_1_12.webp + tests\Images\Input\WebP\lossless_vec_1_13.webp = tests\Images\Input\WebP\lossless_vec_1_13.webp + tests\Images\Input\WebP\lossless_vec_1_14.webp = tests\Images\Input\WebP\lossless_vec_1_14.webp + tests\Images\Input\WebP\lossless_vec_1_15.webp = tests\Images\Input\WebP\lossless_vec_1_15.webp + tests\Images\Input\WebP\lossless_vec_1_2.webp = tests\Images\Input\WebP\lossless_vec_1_2.webp + tests\Images\Input\WebP\lossless_vec_1_3.webp = tests\Images\Input\WebP\lossless_vec_1_3.webp + tests\Images\Input\WebP\lossless_vec_1_4.webp = tests\Images\Input\WebP\lossless_vec_1_4.webp + tests\Images\Input\WebP\lossless_vec_1_5.webp = tests\Images\Input\WebP\lossless_vec_1_5.webp + tests\Images\Input\WebP\lossless_vec_1_6.webp = tests\Images\Input\WebP\lossless_vec_1_6.webp + tests\Images\Input\WebP\lossless_vec_1_7.webp = tests\Images\Input\WebP\lossless_vec_1_7.webp + tests\Images\Input\WebP\lossless_vec_1_8.webp = tests\Images\Input\WebP\lossless_vec_1_8.webp + tests\Images\Input\WebP\lossless_vec_1_9.webp = tests\Images\Input\WebP\lossless_vec_1_9.webp + tests\Images\Input\WebP\lossless_vec_2_0.webp = tests\Images\Input\WebP\lossless_vec_2_0.webp + tests\Images\Input\WebP\lossless_vec_2_1.webp = tests\Images\Input\WebP\lossless_vec_2_1.webp + tests\Images\Input\WebP\lossless_vec_2_10.webp = tests\Images\Input\WebP\lossless_vec_2_10.webp + tests\Images\Input\WebP\lossless_vec_2_11.webp = tests\Images\Input\WebP\lossless_vec_2_11.webp + tests\Images\Input\WebP\lossless_vec_2_12.webp = tests\Images\Input\WebP\lossless_vec_2_12.webp + tests\Images\Input\WebP\lossless_vec_2_13.webp = tests\Images\Input\WebP\lossless_vec_2_13.webp + tests\Images\Input\WebP\lossless_vec_2_14.webp = tests\Images\Input\WebP\lossless_vec_2_14.webp + tests\Images\Input\WebP\lossless_vec_2_15.webp = tests\Images\Input\WebP\lossless_vec_2_15.webp + tests\Images\Input\WebP\lossless_vec_2_2.webp = tests\Images\Input\WebP\lossless_vec_2_2.webp + tests\Images\Input\WebP\lossless_vec_2_3.webp = tests\Images\Input\WebP\lossless_vec_2_3.webp + tests\Images\Input\WebP\lossless_vec_2_4.webp = tests\Images\Input\WebP\lossless_vec_2_4.webp + tests\Images\Input\WebP\lossless_vec_2_5.webp = tests\Images\Input\WebP\lossless_vec_2_5.webp + tests\Images\Input\WebP\lossless_vec_2_6.webp = tests\Images\Input\WebP\lossless_vec_2_6.webp + tests\Images\Input\WebP\lossless_vec_2_7.webp = tests\Images\Input\WebP\lossless_vec_2_7.webp + tests\Images\Input\WebP\lossless_vec_2_8.webp = tests\Images\Input\WebP\lossless_vec_2_8.webp + tests\Images\Input\WebP\lossless_vec_2_9.webp = tests\Images\Input\WebP\lossless_vec_2_9.webp + tests\Images\Input\WebP\lossless_vec_list.txt = tests\Images\Input\WebP\lossless_vec_list.txt + tests\Images\Input\WebP\lossy_alpha1.webp = tests\Images\Input\WebP\lossy_alpha1.webp + tests\Images\Input\WebP\lossy_alpha2.webp = tests\Images\Input\WebP\lossy_alpha2.webp + tests\Images\Input\WebP\lossy_alpha3.webp = tests\Images\Input\WebP\lossy_alpha3.webp + tests\Images\Input\WebP\lossy_alpha4.webp = tests\Images\Input\WebP\lossy_alpha4.webp + tests\Images\Input\WebP\lossy_extreme_probabilities.webp = tests\Images\Input\WebP\lossy_extreme_probabilities.webp + tests\Images\Input\WebP\lossy_q0_f100.webp = tests\Images\Input\WebP\lossy_q0_f100.webp + tests\Images\Input\WebP\near_lossless_75.webp = tests\Images\Input\WebP\near_lossless_75.webp + tests\Images\Input\WebP\peak.bmp = tests\Images\Input\WebP\peak.bmp + tests\Images\Input\WebP\peak.pam = tests\Images\Input\WebP\peak.pam + tests\Images\Input\WebP\peak.pgm = tests\Images\Input\WebP\peak.pgm + tests\Images\Input\WebP\peak.png = tests\Images\Input\WebP\peak.png + tests\Images\Input\WebP\peak.ppm = tests\Images\Input\WebP\peak.ppm + tests\Images\Input\WebP\peak.tiff = tests\Images\Input\WebP\peak.tiff + tests\Images\Input\WebP\segment01.webp = tests\Images\Input\WebP\segment01.webp + tests\Images\Input\WebP\segment02.webp = tests\Images\Input\WebP\segment02.webp + tests\Images\Input\WebP\segment03.webp = tests\Images\Input\WebP\segment03.webp + tests\Images\Input\WebP\small_13x1.webp = tests\Images\Input\WebP\small_13x1.webp + tests\Images\Input\WebP\small_1x1.webp = tests\Images\Input\WebP\small_1x1.webp + tests\Images\Input\WebP\small_1x13.webp = tests\Images\Input\WebP\small_1x13.webp + tests\Images\Input\WebP\small_31x13.webp = tests\Images\Input\WebP\small_31x13.webp + tests\Images\Input\WebP\test-nostrong.webp = tests\Images\Input\WebP\test-nostrong.webp + tests\Images\Input\WebP\test.webp = tests\Images\Input\WebP\test.webp + tests\Images\Input\WebP\test_cwebp.sh = tests\Images\Input\WebP\test_cwebp.sh + tests\Images\Input\WebP\test_dwebp.sh = tests\Images\Input\WebP\test_dwebp.sh + tests\Images\Input\WebP\test_lossless.sh = tests\Images\Input\WebP\test_lossless.sh + tests\Images\Input\WebP\very_short.webp = tests\Images\Input\WebP\very_short.webp + tests\Images\Input\WebP\vp80-00-comprehensive-001.webp = tests\Images\Input\WebP\vp80-00-comprehensive-001.webp + tests\Images\Input\WebP\vp80-00-comprehensive-002.webp = tests\Images\Input\WebP\vp80-00-comprehensive-002.webp + tests\Images\Input\WebP\vp80-00-comprehensive-003.webp = tests\Images\Input\WebP\vp80-00-comprehensive-003.webp + tests\Images\Input\WebP\vp80-00-comprehensive-004.webp = tests\Images\Input\WebP\vp80-00-comprehensive-004.webp + tests\Images\Input\WebP\vp80-00-comprehensive-005.webp = tests\Images\Input\WebP\vp80-00-comprehensive-005.webp + tests\Images\Input\WebP\vp80-00-comprehensive-006.webp = tests\Images\Input\WebP\vp80-00-comprehensive-006.webp + tests\Images\Input\WebP\vp80-00-comprehensive-007.webp = tests\Images\Input\WebP\vp80-00-comprehensive-007.webp + tests\Images\Input\WebP\vp80-00-comprehensive-008.webp = tests\Images\Input\WebP\vp80-00-comprehensive-008.webp + tests\Images\Input\WebP\vp80-00-comprehensive-009.webp = tests\Images\Input\WebP\vp80-00-comprehensive-009.webp + tests\Images\Input\WebP\vp80-00-comprehensive-010.webp = tests\Images\Input\WebP\vp80-00-comprehensive-010.webp + tests\Images\Input\WebP\vp80-00-comprehensive-011.webp = tests\Images\Input\WebP\vp80-00-comprehensive-011.webp + tests\Images\Input\WebP\vp80-00-comprehensive-012.webp = tests\Images\Input\WebP\vp80-00-comprehensive-012.webp + tests\Images\Input\WebP\vp80-00-comprehensive-013.webp = tests\Images\Input\WebP\vp80-00-comprehensive-013.webp + tests\Images\Input\WebP\vp80-00-comprehensive-014.webp = tests\Images\Input\WebP\vp80-00-comprehensive-014.webp + tests\Images\Input\WebP\vp80-00-comprehensive-015.webp = tests\Images\Input\WebP\vp80-00-comprehensive-015.webp + tests\Images\Input\WebP\vp80-00-comprehensive-016.webp = tests\Images\Input\WebP\vp80-00-comprehensive-016.webp + tests\Images\Input\WebP\vp80-00-comprehensive-017.webp = tests\Images\Input\WebP\vp80-00-comprehensive-017.webp + tests\Images\Input\WebP\vp80-01-intra-1400.webp = tests\Images\Input\WebP\vp80-01-intra-1400.webp + tests\Images\Input\WebP\vp80-01-intra-1411.webp = tests\Images\Input\WebP\vp80-01-intra-1411.webp + tests\Images\Input\WebP\vp80-01-intra-1416.webp = tests\Images\Input\WebP\vp80-01-intra-1416.webp + tests\Images\Input\WebP\vp80-01-intra-1417.webp = tests\Images\Input\WebP\vp80-01-intra-1417.webp + tests\Images\Input\WebP\vp80-02-inter-1402.webp = tests\Images\Input\WebP\vp80-02-inter-1402.webp + tests\Images\Input\WebP\vp80-02-inter-1412.webp = tests\Images\Input\WebP\vp80-02-inter-1412.webp + tests\Images\Input\WebP\vp80-02-inter-1418.webp = tests\Images\Input\WebP\vp80-02-inter-1418.webp + tests\Images\Input\WebP\vp80-02-inter-1424.webp = tests\Images\Input\WebP\vp80-02-inter-1424.webp + tests\Images\Input\WebP\vp80-03-segmentation-1401.webp = tests\Images\Input\WebP\vp80-03-segmentation-1401.webp + tests\Images\Input\WebP\vp80-03-segmentation-1403.webp = tests\Images\Input\WebP\vp80-03-segmentation-1403.webp + tests\Images\Input\WebP\vp80-03-segmentation-1407.webp = tests\Images\Input\WebP\vp80-03-segmentation-1407.webp + tests\Images\Input\WebP\vp80-03-segmentation-1408.webp = tests\Images\Input\WebP\vp80-03-segmentation-1408.webp + tests\Images\Input\WebP\vp80-03-segmentation-1409.webp = tests\Images\Input\WebP\vp80-03-segmentation-1409.webp + tests\Images\Input\WebP\vp80-03-segmentation-1410.webp = tests\Images\Input\WebP\vp80-03-segmentation-1410.webp + tests\Images\Input\WebP\vp80-03-segmentation-1413.webp = tests\Images\Input\WebP\vp80-03-segmentation-1413.webp + tests\Images\Input\WebP\vp80-03-segmentation-1414.webp = tests\Images\Input\WebP\vp80-03-segmentation-1414.webp + tests\Images\Input\WebP\vp80-03-segmentation-1415.webp = tests\Images\Input\WebP\vp80-03-segmentation-1415.webp + tests\Images\Input\WebP\vp80-03-segmentation-1425.webp = tests\Images\Input\WebP\vp80-03-segmentation-1425.webp + tests\Images\Input\WebP\vp80-03-segmentation-1426.webp = tests\Images\Input\WebP\vp80-03-segmentation-1426.webp + tests\Images\Input\WebP\vp80-03-segmentation-1427.webp = tests\Images\Input\WebP\vp80-03-segmentation-1427.webp + tests\Images\Input\WebP\vp80-03-segmentation-1432.webp = tests\Images\Input\WebP\vp80-03-segmentation-1432.webp + tests\Images\Input\WebP\vp80-03-segmentation-1435.webp = tests\Images\Input\WebP\vp80-03-segmentation-1435.webp + tests\Images\Input\WebP\vp80-03-segmentation-1436.webp = tests\Images\Input\WebP\vp80-03-segmentation-1436.webp + tests\Images\Input\WebP\vp80-03-segmentation-1437.webp = tests\Images\Input\WebP\vp80-03-segmentation-1437.webp + tests\Images\Input\WebP\vp80-03-segmentation-1441.webp = tests\Images\Input\WebP\vp80-03-segmentation-1441.webp + tests\Images\Input\WebP\vp80-03-segmentation-1442.webp = tests\Images\Input\WebP\vp80-03-segmentation-1442.webp + tests\Images\Input\WebP\vp80-04-partitions-1404.webp = tests\Images\Input\WebP\vp80-04-partitions-1404.webp + tests\Images\Input\WebP\vp80-04-partitions-1405.webp = tests\Images\Input\WebP\vp80-04-partitions-1405.webp + tests\Images\Input\WebP\vp80-04-partitions-1406.webp = tests\Images\Input\WebP\vp80-04-partitions-1406.webp + tests\Images\Input\WebP\vp80-05-sharpness-1428.webp = tests\Images\Input\WebP\vp80-05-sharpness-1428.webp + tests\Images\Input\WebP\vp80-05-sharpness-1429.webp = tests\Images\Input\WebP\vp80-05-sharpness-1429.webp + tests\Images\Input\WebP\vp80-05-sharpness-1430.webp = tests\Images\Input\WebP\vp80-05-sharpness-1430.webp + tests\Images\Input\WebP\vp80-05-sharpness-1431.webp = tests\Images\Input\WebP\vp80-05-sharpness-1431.webp + tests\Images\Input\WebP\vp80-05-sharpness-1433.webp = tests\Images\Input\WebP\vp80-05-sharpness-1433.webp + tests\Images\Input\WebP\vp80-05-sharpness-1434.webp = tests\Images\Input\WebP\vp80-05-sharpness-1434.webp + tests\Images\Input\WebP\vp80-05-sharpness-1438.webp = tests\Images\Input\WebP\vp80-05-sharpness-1438.webp + tests\Images\Input\WebP\vp80-05-sharpness-1439.webp = tests\Images\Input\WebP\vp80-05-sharpness-1439.webp + tests\Images\Input\WebP\vp80-05-sharpness-1440.webp = tests\Images\Input\WebP\vp80-05-sharpness-1440.webp + tests\Images\Input\WebP\vp80-05-sharpness-1443.webp = tests\Images\Input\WebP\vp80-05-sharpness-1443.webp EndProjectSection EndProject Global @@ -482,10 +608,7 @@ Global {EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC} {2BF743D8-2A06-412D-96D7-F448F00C5EA5} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC} {561B880A-D9EE-44EF-90F5-817C54A9D9AB} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC} - {7BEE9435-1833-4686-8B36-C4EE2F13D908} = {9DA226A1-8656-49A8-A58A-A8B5C081AD66} - {41D10A70-59CE-4634-9145-CE9B60050371} = {7BEE9435-1833-4686-8B36-C4EE2F13D908} - {F19E6F18-4102-4134-8A96-FEC2AB67F794} = {7BEE9435-1833-4686-8B36-C4EE2F13D908} - {E6B81E19-B27F-4656-9169-4B8415D064A2} = {41D10A70-59CE-4634-9145-CE9B60050371} + {983A31E2-5E26-4058-BD6E-03B4922D4BBF} = {9DA226A1-8656-49A8-A58A-A8B5C081AD66} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5F8B9D1F-CD8B-4CC5-8216-D531E25BD795} diff --git a/tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs b/tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs index 49e85319be..d9c65cc2e1 100644 --- a/tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs @@ -24,6 +24,9 @@ namespace SixLabors.ImageSharp.Tests.Formats.WebP [Theory] [InlineData(Lossless.Lossless1, 1000, 307)] + [InlineData(Lossless.Lossless2, 1000, 307)] + [InlineData(Lossy.Alpha.LossyAlpha1, 1000, 307)] + [InlineData(Lossy.Alpha.LossyAlpha2, 1000, 307)] public void Identify_DetectsCorrectDimensions(string imagePath, int expectedWidth, int expectedHeight) { var testFile = TestFile.Create(imagePath); diff --git a/tests/ImageSharp.Tests/Formats/WebP/WebPMetaDataTests.cs b/tests/ImageSharp.Tests/Formats/WebP/WebPMetaDataTests.cs index d1b1301022..44163da173 100644 --- a/tests/ImageSharp.Tests/Formats/WebP/WebPMetaDataTests.cs +++ b/tests/ImageSharp.Tests/Formats/WebP/WebPMetaDataTests.cs @@ -11,6 +11,7 @@ using Xunit; namespace SixLabors.ImageSharp.Tests.Formats.WebP { + using static SixLabors.ImageSharp.Tests.TestImages.WebP; using static TestImages.Bmp; public class WebPMetaDataTests @@ -18,7 +19,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.WebP [Fact] public void CloneIsDeep() { - /* TODO: + /*TODO: var meta = new WebPMetadata { BitsPerPixel = BmpBitsPerPixel.Pixel24 }; var clone = (WebPMetadata)meta.DeepClone(); @@ -28,7 +29,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.WebP } [Theory] - [InlineData(TestImages.WebP.Lossy.SampleWebpOne, BmpInfoHeaderType.WinVersion2)] + [InlineData(Lossless.Lossless1, BmpInfoHeaderType.WinVersion2)] public void Identify_DetectsCorrectBitmapInfoHeaderType(string imagePath, BmpInfoHeaderType expectedInfoHeaderType) { var testFile = TestFile.Create(imagePath); @@ -36,9 +37,9 @@ namespace SixLabors.ImageSharp.Tests.Formats.WebP { IImageInfo imageInfo = Image.Identify(stream); Assert.NotNull(imageInfo); - WebPMetadata webpMetaData = imageInfo.Metadata.GetFormatMetadata(WebPFormat.Instance); - Assert.NotNull(webpMetaData); - //TODO: + Assert.Equal(24, imageInfo.PixelType.BitsPerPixel); + //var webpMetaData = imageInfo.Metadata.GetFormatMetadata(WebPFormat.Instance); + //Assert.NotNull(webpMetaData); //Assert.Equal(expectedInfoHeaderType, webpMetaData.InfoHeaderType); } } diff --git a/tests/ImageSharp.Tests/TestImages.cs b/tests/ImageSharp.Tests/TestImages.cs index 6f310f470a..77c58758bb 100644 --- a/tests/ImageSharp.Tests/TestImages.cs +++ b/tests/ImageSharp.Tests/TestImages.cs @@ -372,6 +372,9 @@ namespace SixLabors.ImageSharp.Tests public static class Lossless { public const string Lossless1 = "WebP/lossless1.webp"; + public const string Lossless2 = "WebP/lossles2.webp"; + public const string Lossless3 = "WebP/lossless3.webp"; + public const string Lossless4 = "WebP/lossless4.webp"; } public static class Lossy @@ -384,11 +387,10 @@ namespace SixLabors.ImageSharp.Tests public static class Alpha { - public const string SampleWebpOne = "WebP/Lossy/Alpha/1_webp_a.webp"; - public const string SampleWebpTwo = "WebP/Lossy/Alpha/2_webp_a.webp"; - public const string SampleWebpThree = "WebP/Lossy/Alpha/3_webp_a.webp"; - public const string SampleWebpFour = "WebP/Lossy/Alpha/4_webp_a.webp"; - public const string SampleWebpFive = "WebP/Lossy/Alpha/5_webp_a.webp"; + public const string LossyAlpha1 = "WebP/lossy_alpha1.webp"; + public const string LossyAlpha2 = "WebP/lossy_alpha2.webp"; + public const string LossyAlpha3 = "WebP/lossy_alpha3.webp"; + public const string LossyAlpha4 = "WebP/lossy_alpha4.webp"; } }