[core] add stb_image to read more supported picture formats

This commit is contained in:
Seven Du
2021-10-23 22:00:03 +03:00
committed by Andrey Volk
parent 9d2cb8b190
commit 58d5442dc5
6 changed files with 7619 additions and 0 deletions
+21
View File
@@ -199,6 +199,27 @@ FST_CORE_BEGIN("./conf")
switch_img_free(&timg_small);
}
FST_TEST_END()
FST_TEST_BEGIN(read_from_file)
{
switch_image_t *img;
img = switch_img_read_from_file("../../images/cluecon.png", SWITCH_IMG_FMT_I420);
fst_requires(img);
switch_img_write_png(img, "cluecon-rgb.png");
switch_img_free(&img);
img = switch_img_read_from_file("../../images/cluecon.png", SWITCH_IMG_FMT_ARGB);
fst_requires(img);
switch_img_write_png(img, "cluecon-argb.png");
switch_img_free(&img);
img = switch_img_read_from_file("../../images/cluecon.jpg", SWITCH_IMG_FMT_I420);
fst_requires(img);
switch_img_write_png(img, "cluecon-jpg.png");
switch_img_free(&img);
}
FST_TEST_END()
}
FST_SUITE_END()
}