1 // Aseprite 2 // Copyright (C) 2001-2016 David Capello 3 // 4 // This program is distributed under the terms of 5 // the End-User License Agreement for Aseprite. 6 7 #ifndef APP_CRASH_READ_DOCUMENT_H_INCLUDED 8 #define APP_CRASH_READ_DOCUMENT_H_INCLUDED 9 #pragma once 10 11 #include "app/crash/raw_images_as.h" 12 #include "doc/frame.h" 13 #include "doc/pixel_format.h" 14 15 #include <string> 16 17 namespace app { 18 class Doc; 19 namespace crash { 20 21 struct DocumentInfo { 22 doc::PixelFormat format; 23 int width; 24 int height; 25 doc::frame_t frames; 26 std::string filename; 27 DocumentInfoDocumentInfo28 DocumentInfo() : 29 format(doc::IMAGE_RGB), 30 width(0), 31 height(0), 32 frames(0) { 33 } 34 }; 35 36 bool read_document_info(const std::string& dir, DocumentInfo& info); 37 Doc* read_document(const std::string& dir); 38 Doc* read_document_with_raw_images(const std::string& dir, 39 RawImagesAs as); 40 41 } // namespace crash 42 } // namespace app 43 44 #endif 45