Make progressive JPEGs return a proper error

Add progressive JPEG file to test suite and test that loading it returns the expected `Unsupported_Frame_Type` error.

This JPEG variant will hopefully be supported in the future, but we should at least return an error rather than use `unsupported()`.
This commit is contained in:
Jeroen van Rijn
2025-09-09 13:53:43 +02:00
parent 9abc3f67b5
commit dd9fceaae1
3 changed files with 277 additions and 270 deletions
+8 -2
View File
@@ -5,7 +5,7 @@
List of contributors:
Jeroen van Rijn: Initial implementation.
A test suite for PNG, TGA, NetPBM, QOI and BMP.
A test suite for PNG, TGA, NetPBM, QOI, BMP, and JPEG.
*/
#+feature dynamic-literals
package test_core_image
@@ -2366,7 +2366,13 @@ run_bmp_suite :: proc(t: ^testing.T, suite: []Test) {
Basic_JPG_Tests := []Test{
{
"emblem-1024", {
{Default, nil, {1024, 1024, 3, 8}, 0x_46a29e0f},
{Default, nil, {1024, 1024, 3, 8}, 0x_46a29e0f},
// {Alpha_Add, nil, {1024, 1024, 4, 8}, 0x_46a29e0f},
},
},
{
"emblem-1024-progressive", {
{Default, .Unsupported_Frame_Type, {1024, 1024, 3, 8}, 0x_46a29e0f},
},
},
}