42 lines
996 B
C++
42 lines
996 B
C++
#include "PngReader.h"
|
|
|
|
#include "BitStream.h"
|
|
#include "TestUtils.h"
|
|
|
|
#include "Image.h"
|
|
#include <iostream>
|
|
|
|
#include "TestFramework.h"
|
|
|
|
TEST_CASE(TestThirdPartyPng, "image")
|
|
{
|
|
const auto path = TestUtils::getTestDataDir() / "test.png";
|
|
|
|
//const auto path = "/home/jmsgrogan/Downloads/index.png";
|
|
|
|
//const auto path = "/home/jmsgrogan/code/MediaTool-build/bin/test.png";
|
|
|
|
//File file(path);
|
|
//std::cout << file.dumpBinary();
|
|
|
|
PngReader reader;
|
|
reader.setPath(path);
|
|
auto image = reader.read();
|
|
|
|
//for(unsigned idx=0; idx<image->getWidth()*image->getBytesPerRow(); idx++)
|
|
//{
|
|
// std::cout << "Image val: " << idx << " | " << static_cast<int>(image->getDataRef()[idx]) << std::endl;
|
|
//}
|
|
}
|
|
|
|
TEST_CASE(TestFxedCodePng, "image")
|
|
{
|
|
const auto path = TestUtils::getTestDataDir() / "test_fixed.png";
|
|
|
|
//File file(path);
|
|
//std::cout << file.dumpBinary();
|
|
|
|
PngReader reader;
|
|
reader.setPath(path);
|
|
auto image = reader.read();
|
|
}
|