Skip to content

Add power of two sheet size flag on CLI #5529

Merged
dacap merged 2 commits into
aseprite:betafrom
Gasparoken:add-cli-power-of-two
Apr 20, 2026
Merged

Add power of two sheet size flag on CLI #5529
dacap merged 2 commits into
aseprite:betafrom
Gasparoken:add-cli-power-of-two

Conversation

@Gasparoken

@Gasparoken Gasparoken commented Nov 11, 2025

Copy link
Copy Markdown
Member

Fix #2289

@Gasparoken Gasparoken self-assigned this Nov 11, 2025
@Gasparoken Gasparoken requested a review from dacap as a code owner November 11, 2025 19:18

@aseprite-bot aseprite-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/app/cli/cli_processor.cpp Outdated
Doc* lastDoc = nullptr;
render::DitheringAlgorithm ditheringAlgorithm = render::DitheringAlgorithm::None;
std::string ditheringMatrix;
bool powerOfTwoSize = false;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'powerOfTwoSize' of type 'bool' can be declared 'const' [misc-const-correctness]

Suggested change
bool powerOfTwoSize = false;
bool const powerOfTwoSize = false;

@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@dacap dacap changed the base branch from main to beta November 19, 2025 18:55
@Gasparoken Gasparoken force-pushed the add-cli-power-of-two branch 2 times, most recently from 3bb8c00 to a7b9828 Compare December 3, 2025 12:23
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@Gasparoken Gasparoken force-pushed the add-cli-power-of-two branch from a7b9828 to 81b4ee8 Compare December 3, 2025 13:06
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@Gasparoken Gasparoken force-pushed the add-cli-power-of-two branch from 81b4ee8 to 2355d83 Compare December 3, 2025 13:40
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@martincapello martincapello changed the title Add power of two sheet size flag on CLI (fix #2289) Add power of two sheet size flag on CLI Dec 4, 2025

@martincapello martincapello left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I left just a minor comment about the description, but it is not actually an issue, so feel free to leave it as is if you like yours.

Comment thread src/app/cli/app_options.cpp Outdated
, m_sheetHeight(
m_po.add("sheet-height").requiresValue("<pixels>").description("Sprite sheet height"))
, m_powerOfTwoSize(m_po.add("power-of-two-size")
.description("Round up the size of the sprite sheet to a power of 2"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would change the description for something like:
"Round up the width and height of the sprite sheet to the nearest power of 2"

Added the CLI flag --power-of-two-size to round up
the size of the sprite sheet to a power of 2.
@Gasparoken Gasparoken force-pushed the add-cli-power-of-two branch from 2355d83 to 2fa98af Compare March 3, 2026 14:25
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@Gasparoken Gasparoken assigned dacap and unassigned Gasparoken Mar 3, 2026
@Gasparoken

Copy link
Copy Markdown
Member Author

I'll add a simple automatic test

@Gasparoken Gasparoken assigned Gasparoken and unassigned dacap Mar 3, 2026
@Gasparoken Gasparoken assigned dacap and unassigned Gasparoken Mar 3, 2026
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@dacap dacap merged commit cd1fd35 into aseprite:beta Apr 20, 2026
12 checks passed
@dacap dacap linked an issue Apr 21, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] [feature request] Power of two sheet size flag

4 participants