1234567891011121314151617181920212223242526272829303132 |
- #include "../Tests.h"
- /*static void testReadPNG(Test& test, const char* path, const char* name,
- unsigned int channels, unsigned int bitdepth) {
- ImageReader::Image image;
- Error error =
- ImageReader::load(image, String(path).append(name).append(".png"));
- if(error.has()) {
- test.checkEqual(false, true,
- String("read ").append(name).append(" error"));
- return;
- }
- test.checkEqual(32u, image.width, String(name).append(" width"));
- test.checkEqual(64u, image.height, String(name).append(" height"));
- test.checkEqual(channels, image.channels, String(name).append(" channels"));
- test.checkEqual(bitdepth, image.bitdepth, String(name).append(" bitdepth"));
- test.checkEqual(true, image.data != nullptr, String(name).append(" data"));
- }*/
- void coreTestImageReader(const char* path) {
- (void)path;
- // Test test("ImageReader");
- // testReadPNG(test, path, "rgb8", 3, 8);
- // testReadPNG(test, path, "rgb16", 3, 16);
- // testReadPNG(test, path, "rgba8", 4, 8);
- // testReadPNG(test, path, "rgba16", 4, 16);
- // testReadPNG(test, path, "gray8", 1, 8);
- // testReadPNG(test, path, "gray16", 1, 16);
- // testReadPNG(test, path, "graya8", 2, 8);
- // testReadPNG(test, path, "graya16", 2, 16);
- // test.finalize();
- }
|