1 // psd-test.cpp : Defines the entry point for the console application.
5 #include "../../modules/psd/doc.h"
6 #include "../../modules/psd/layer.h"
7 #include "../../common/utf.h"
12 #include <boost/property_tree/ptree.hpp>
13 #include <boost/property_tree/json_parser.hpp>
16 int _tmain(int argc, _TCHAR* argv[])
18 caspar::psd::psd_document doc;
19 doc.parse(L"C:\\Lokala Filer\\Utveckling\\CasparCG\\Server 2.1\\test\\data\\test1.psd");
23 //std::wstringstream trace;
25 //trace << L"<doc filename='" << doc.filename() << L"' color_mode='" << caspar::psd::color_mode_to_string(doc.color_mode()) << L"' color_depth='" << doc.color_depth() << L"' channel_count='" << doc.channels_count() << L"' width='" << doc.width() << L"' height='" << doc.height() << L"'>" << std::endl;
28 //auto end = doc.layers().end();
29 //for(auto it = doc.layers().begin(); it != end; ++it)
31 // caspar::psd::layer_ptr layer = (*it);
32 // trace << L" <layer name='" << layer->name() << L"' opacity='" << layer->opacity() << L"'>" << std::endl;
34 // trace << L" <bounding-box left='" << layer->rect().left << "' top='" << layer->rect().top << "' right='" << layer->rect().right << "' bottom='" << layer->rect().bottom << "' />" << std::endl;
36 // trace << L" <mask default-value='" << layer->default_mask_value() << "' left='" << layer->mask_rect().left << "' top='" << layer->mask_rect().top << "' right='" << layer->mask_rect().right << "' bottom='" << layer->mask_rect().bottom << "' />" << std::endl;
37 // trace << L" </layer>" << std::endl;
40 //trace << L"</doc>" << std::endl;
42 //std::cout << caspar::u8(trace.str());