Skip to content

Commit

Permalink
Fix palette is not generated from RGB sprite sheet file after Export …
Browse files Browse the repository at this point in the history
…Sprite Sheet (fix aseprite#4127)
  • Loading branch information
Gasparoken committed Nov 13, 2023
1 parent f92f14f commit 6e2c3c6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/doc_exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "app/doc_exporter.h"

#include "app/app.h"
#include "app/cmd/set_pixel_format.h"
#include "app/console.h"
#include "app/context.h"
Expand Down Expand Up @@ -1184,9 +1185,15 @@ Doc* DocExporter::createEmptyTexture(const Samples& samples,
int maxColors = 256;
gfx::ColorSpaceRef colorSpace;
color_t transparentColor = 0;
bool ui = false;
#ifdef ENABLE_UI
if (App::instance()->isGui())
ui = true;
#endif
const bool textureSupportsPalette =
(m_textureFilename.empty() || // This is the preview and we create the palette anyway
format_supports_palette(m_textureFilename));
format_supports_palette(m_textureFilename)) ||
ui;

for (const auto& sample : samples) {
if (token.canceled())
Expand Down

0 comments on commit 6e2c3c6

Please sign in to comment.