1// Aseprite
2// Copyright (C) 2019-2020 Igara Studio S.A.
3//
4// This program is distributed under the terms of
5// the End-User License Agreement for Aseprite.
6
7#ifndef APP_FILE_FILE_OP_CONFIG_H_INCLUDED
8#define APP_FILE_FILE_OP_CONFIG_H_INCLUDED
9#pragma once
10
11#include "app/color.h"
12#include "app/pref/preferences.h"
13#include "doc/rgbmap_algorithm.h"
14#include "gfx/color_space.h"
15
16namespace app {
17
18 // Options that came from Preferences but can be used in the non-UI thread.
19 struct FileOpConfig {
20 // True if we have to save/embed the color space of the document
21 // in the file.
22 bool preserveColorProfile = true;
23
24 // Configuration of what to do when we load a file with a color
25 // profile or without a color profile.
26 app::gen::ColorProfileBehavior filesWithProfile = app::gen::ColorProfileBehavior::EMBEDDED;
27 app::gen::ColorProfileBehavior missingProfile = app::gen::ColorProfileBehavior::ASSIGN;
28 gfx::ColorSpaceRef workingCS = gfx::ColorSpace::MakeSRGB();
29
30 // True if we should render each frame to save it with the new
31 // blend mode.h
32 bool newBlend = true;
33
34 app::Color defaultSliceColor = app::Color::fromRgb(0, 0, 255);
35
36 // Algorithm used to create a palette from RGB files.
37 doc::RgbMapAlgorithm rgbMapAlgorithm = doc::RgbMapAlgorithm::DEFAULT;
38
39 void fillFromPreferences();
40 };
41
42} // namespace app
43
44#endif
45