加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.cpp 844 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaozhuai 提交于 2021-06-09 17:03 . optimize template args
#include <iostream>
#include "imageinfo.hpp"
int main(int argc, char **argv) {
if (argc < 2) {
std::cout << "Usage: " << argv[0] << " <file>\n";
return 1;
}
const char *file = argv[1];
auto imageInfo = getImageInfo<IIFilePathReader>(file);
std::cout << "File: " << file << "\n";
std::cout << " - Error : " << imageInfo.getErrorMsg() << "\n";
std::cout << " - Width : " << imageInfo.getWidth() << "\n";
std::cout << " - Height : " << imageInfo.getHeight() << "\n";
std::cout << " - Format : " << imageInfo.getFormat() << "\n";
std::cout << " - Ext : " << imageInfo.getExt() << "\n";
std::cout << " - Full Ext : " << imageInfo.getFullExt() << "\n";
std::cout << " - Mimetype : " << imageInfo.getMimetype() << "\n\n";
return imageInfo.getErrorCode();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化