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