47 lines
995 B
C++
47 lines
995 B
C++
#include "PngReader.h"
|
|
|
|
#include "BitStream.h"
|
|
|
|
#include "Image.h"
|
|
#include <iostream>
|
|
|
|
void testThirdParty()
|
|
{
|
|
//const auto path = "/home/jmsgrogan/Downloads/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;
|
|
//}
|
|
}
|
|
|
|
void testFixedCode()
|
|
{
|
|
const auto path = "/home/jmsgrogan/code/MediaTool-build/bin/test_fixed.png";
|
|
|
|
//File file(path);
|
|
//std::cout << file.dumpBinary();
|
|
|
|
PngReader reader;
|
|
reader.setPath(path);
|
|
auto image = reader.read();
|
|
}
|
|
|
|
int main()
|
|
{
|
|
testThirdParty();
|
|
//testFixedCode();
|
|
|
|
return 0;
|
|
}
|