Skip to content

Feature: Add Pixel Statistics Panel #1155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cd33
Copy link

@cd33 cd33 commented Mar 7, 2025

This PR introduces a new Pixel Statistics feature that provides detailed insights about the current frame and layer in the sprite editor. The new statistics panel includes:

Key Features:

  • Real-time pixel statistics tracking
  • Display of total pixels in the current frame
  • Count and percentage of used (non-transparent) pixels
  • Transparency percentage calculation
  • Color usage breakdown with:
    • Total number of unique colors
    • Individual color statistics with usage percentages
    • Visual color swatches for each used color
    • Improved ergonomics by allowing users to adjust the size of the panels to suit their needs

Technical Implementation:

  • Added new PixelStatsController and PixelStatsService for managing statistics
  • Implemented efficient caching mechanism for performance optimization
  • Responsive updates on various editor events (frame changes, layer modifications, selections, etc.)
  • Clean UI integration with existing toolbox layout

This feature helps artists better understand their sprite composition and color usage patterns, making it easier to optimize sprites and maintain consistent color schemes.

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.

1 participant