yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
bpp_format_ui.cc
Go to the documentation of this file.
1#include "bpp_format_ui.h"
2
3#include <algorithm>
4#include <sstream>
5
9#include "imgui/imgui.h"
10
11namespace yaze {
12namespace gui {
13
14BppFormatUI::BppFormatUI(const std::string& id)
15 : id_(id),
16 selected_format_(gfx::BppFormat::kBpp8),
17 preview_format_(gfx::BppFormat::kBpp8),
18 show_analysis_(false),
19 show_preview_(false),
20 show_sheet_analysis_(false),
21 format_changed_(false),
22 last_analysis_sheet_("") {}
23
25 gfx::Bitmap* bitmap, const gfx::SnesPalette& palette,
26 std::function<void(gfx::BppFormat)> on_format_changed) {
27 if (!bitmap)
28 return false;
29
30 format_changed_ = false;
31
32 ImGui::BeginGroup();
33 ImGui::Text("BPP Format Selection");
34 ImGui::Separator();
35
36 // Current format detection
38 bitmap->vector(), bitmap->width(), bitmap->height());
39
40 ImGui::Text(
41 "Current Format: %s",
42 gfx::BppFormatManager::Get().GetFormatInfo(current_format).name.c_str());
43
44 // Format selection
45 ImGui::Text("Target Format:");
46 ImGui::SameLine();
47
48 const char* format_names[] = {"2BPP", "3BPP", "4BPP", "8BPP"};
49 int current_selection =
50 static_cast<int>(selected_format_) - 2; // Convert to 0-based index
51
52 if (ImGui::Combo("##BppFormat", &current_selection, format_names, 4)) {
53 selected_format_ = static_cast<gfx::BppFormat>(current_selection + 2);
54 format_changed_ = true;
55 }
56
57 // Format information
58 const auto& format_info =
60 ImGui::Text("Max Colors: %d", format_info.max_colors);
61 ImGui::Text("Bytes per Tile: %d", format_info.bytes_per_tile);
62 ImGui::Text("Description: %s", format_info.description.c_str());
63
64 // Conversion efficiency
65 if (current_format != selected_format_) {
66 int efficiency = GetConversionEfficiency(current_format, selected_format_);
67 ImGui::Text("Conversion Efficiency: %d%%", efficiency);
68
69 ImVec4 efficiency_color;
70 if (efficiency >= 80) {
71 efficiency_color = GetSuccessColor(); // Green
72 } else if (efficiency >= 60) {
73 efficiency_color = GetWarningColor(); // Yellow
74 } else {
75 efficiency_color = GetErrorColor(); // Red
76 }
77 ImGui::TextColored(efficiency_color, "Quality: %s",
78 efficiency >= 80 ? "Excellent"
79 : efficiency >= 60 ? "Good"
80 : "Poor");
81 }
82
83 // Action buttons
84 ImGui::Separator();
85
86 if (ImGui::Button("Convert Format")) {
87 if (on_format_changed) {
88 on_format_changed(selected_format_);
89 }
90 format_changed_ = true;
91 }
92
93 ImGui::SameLine();
94 if (ImGui::Button("Show Analysis")) {
96 }
97
98 ImGui::SameLine();
99 if (ImGui::Button("Preview Conversion")) {
102 }
103
104 ImGui::EndGroup();
105
106 // Analysis panel
107 if (show_analysis_) {
108 RenderAnalysisPanel(*bitmap, palette);
109 }
110
111 // Preview panel
112 if (show_preview_) {
113 RenderConversionPreview(*bitmap, preview_format_, palette);
114 }
115
116 return format_changed_;
117}
118
120 const gfx::SnesPalette& palette) {
121 ImGui::Begin("BPP Format Analysis", &show_analysis_);
122
123 // Basic analysis
125 bitmap.vector(), bitmap.width(), bitmap.height());
126
127 ImGui::Text(
128 "Detected Format: %s",
129 gfx::BppFormatManager::Get().GetFormatInfo(detected_format).name.c_str());
130
131 // Color usage analysis
132 std::vector<int> color_usage(256, 0);
133 for (uint8_t pixel : bitmap.vector()) {
134 color_usage[pixel]++;
135 }
136
137 int used_colors = 0;
138 for (int count : color_usage) {
139 if (count > 0)
140 used_colors++;
141 }
142
143 ImGui::Text("Colors Used: %d / %d", used_colors,
144 static_cast<int>(palette.size()));
145 ImGui::Text("Color Efficiency: %.1f%%",
146 (static_cast<float>(used_colors) / palette.size()) * 100.0f);
147
148 // Color usage chart
149 if (ImGui::CollapsingHeader("Color Usage Chart")) {
150 RenderColorUsageChart(color_usage);
151 }
152
153 // Format recommendations
154 ImGui::Separator();
155 ImGui::Text("Format Recommendations:");
156
157 if (used_colors <= 4) {
158 ImGui::TextColored(GetSuccessColor(), "✓ 2BPP format would be optimal");
159 } else if (used_colors <= 8) {
160 ImGui::TextColored(GetSuccessColor(), "✓ 3BPP format would be optimal");
161 } else if (used_colors <= 16) {
162 ImGui::TextColored(GetSuccessColor(), "✓ 4BPP format would be optimal");
163 } else {
164 ImGui::TextColored(GetWarningColor(), "⚠ 8BPP format is necessary");
165 }
166
167 // Memory usage comparison
168 if (ImGui::CollapsingHeader("Memory Usage Comparison")) {
169 const auto& current_info =
170 gfx::BppFormatManager::Get().GetFormatInfo(detected_format);
171 int current_bytes =
172 (bitmap.width() * bitmap.height() * current_info.bits_per_pixel) / 8;
173
174 ImGui::Text("Current Format (%s): %d bytes", current_info.name.c_str(),
175 current_bytes);
176
177 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
178 if (format == detected_format)
179 continue;
180
181 const auto& info = gfx::BppFormatManager::Get().GetFormatInfo(format);
182 int format_bytes =
183 (bitmap.width() * bitmap.height() * info.bits_per_pixel) / 8;
184 float ratio = static_cast<float>(format_bytes) / current_bytes;
185
186 ImGui::Text("%s: %d bytes (%.1fx)", info.name.c_str(), format_bytes,
187 ratio);
188 }
189 }
190
191 ImGui::End();
192}
193
195 gfx::BppFormat target_format,
196 const gfx::SnesPalette& palette) {
197 ImGui::Begin("BPP Conversion Preview", &show_preview_);
198
200 bitmap.vector(), bitmap.width(), bitmap.height());
201
202 if (current_format == target_format) {
203 ImGui::Text("No conversion needed - formats are identical");
204 ImGui::End();
205 return;
206 }
207
208 // Convert the bitmap
209 auto converted_data = gfx::BppFormatManager::Get().ConvertFormat(
210 bitmap.vector(), current_format, target_format, bitmap.width(),
211 bitmap.height());
212
213 // Create preview bitmap
214 gfx::Bitmap preview_bitmap(bitmap.width(), bitmap.height(), bitmap.depth(),
215 converted_data, palette);
216
217 // Render side-by-side comparison
218 ImGui::Text(
219 "Original (%s) vs Converted (%s)",
220 gfx::BppFormatManager::Get().GetFormatInfo(current_format).name.c_str(),
221 gfx::BppFormatManager::Get().GetFormatInfo(target_format).name.c_str());
222
223 ImGui::Columns(2, "PreviewColumns");
224
225 // Original
226 ImGui::Text("Original");
227 if (bitmap.texture()) {
228 ImGui::Image((ImTextureID)(intptr_t)bitmap.texture(),
229 ImVec2(256, 256 * bitmap.height() / bitmap.width()));
230 }
231
232 ImGui::NextColumn();
233
234 // Converted
235 ImGui::Text("Converted");
236 if (preview_bitmap.texture()) {
237 ImGui::Image(
238 (ImTextureID)(intptr_t)preview_bitmap.texture(),
239 ImVec2(256, 256 * preview_bitmap.height() / preview_bitmap.width()));
240 }
241
242 ImGui::Columns(1);
243
244 // Conversion statistics
245 ImGui::Separator();
246 ImGui::Text("Conversion Statistics:");
247
248 const auto& from_info =
250 const auto& to_info =
252
253 int from_bytes =
254 (bitmap.width() * bitmap.height() * from_info.bits_per_pixel) / 8;
255 int to_bytes =
256 (bitmap.width() * bitmap.height() * to_info.bits_per_pixel) / 8;
257
258 ImGui::Text("Size: %d bytes -> %d bytes", from_bytes, to_bytes);
259 ImGui::Text("Compression Ratio: %.2fx",
260 static_cast<float>(from_bytes) / to_bytes);
261
262 ImGui::End();
263}
264
265void BppFormatUI::RenderSheetAnalysis(const std::vector<uint8_t>& sheet_data,
266 int sheet_id,
267 const gfx::SnesPalette& palette) {
268 std::string analysis_key = "sheet_" + std::to_string(sheet_id);
269
270 // Check if we need to update analysis
271 if (last_analysis_sheet_ != analysis_key) {
273 sheet_data, sheet_id, palette);
274 UpdateAnalysisCache(sheet_id, analysis);
275 last_analysis_sheet_ = analysis_key;
276 }
277
278 auto it = cached_analysis_.find(sheet_id);
279 if (it == cached_analysis_.end())
280 return;
281
282 const auto& analysis = it->second;
283
284 ImGui::Begin("Graphics Sheet Analysis", &show_sheet_analysis_);
285
286 ImGui::Text("Sheet ID: %d", analysis.sheet_id);
287 ImGui::Text("Original Format: %s",
289 .GetFormatInfo(analysis.original_format)
290 .name.c_str());
291 ImGui::Text("Current Format: %s", gfx::BppFormatManager::Get()
292 .GetFormatInfo(analysis.current_format)
293 .name.c_str());
294
295 if (analysis.was_converted) {
296 ImGui::TextColored(GetWarningColor(), "⚠ This sheet was converted");
297 ImGui::Text("Conversion History: %s", analysis.conversion_history.c_str());
298 } else {
299 ImGui::TextColored(GetSuccessColor(), "✓ Original format preserved");
300 }
301
302 ImGui::Separator();
303 ImGui::Text("Color Usage: %d / %d colors used", analysis.palette_entries_used,
304 static_cast<int>(palette.size()));
305 ImGui::Text("Compression Ratio: %.2fx", analysis.compression_ratio);
306 ImGui::Text("Size: %zu -> %zu bytes", analysis.original_size,
307 analysis.current_size);
308
309 // Tile usage pattern
310 if (ImGui::CollapsingHeader("Tile Usage Pattern")) {
311 int total_tiles = analysis.tile_usage_pattern.size();
312 int used_tiles = 0;
313 int empty_tiles = 0;
314
315 for (int usage : analysis.tile_usage_pattern) {
316 if (usage > 0) {
317 used_tiles++;
318 } else {
319 empty_tiles++;
320 }
321 }
322
323 ImGui::Text("Total Tiles: %d", total_tiles);
324 ImGui::Text("Used Tiles: %d (%.1f%%)", used_tiles,
325 (static_cast<float>(used_tiles) / total_tiles) * 100.0f);
326 ImGui::Text("Empty Tiles: %d (%.1f%%)", empty_tiles,
327 (static_cast<float>(empty_tiles) / total_tiles) * 100.0f);
328 }
329
330 // Recommendations
331 ImGui::Separator();
332 ImGui::Text("Recommendations:");
333
334 if (analysis.was_converted && analysis.palette_entries_used <= 16) {
335 ImGui::TextColored(
337 "✓ Consider reverting to %s format for better compression",
339 .GetFormatInfo(analysis.original_format)
340 .name.c_str());
341 }
342
343 if (analysis.palette_entries_used < static_cast<int>(palette.size()) / 2) {
344 ImGui::TextColored(GetWarningColor(),
345 "⚠ Palette is underutilized - consider optimization");
346 }
347
348 ImGui::End();
349}
350
352 gfx::BppFormat to_format) const {
353 // All conversions are available in our implementation
354 return from_format != to_format;
355}
356
358 gfx::BppFormat to_format) const {
359 // Calculate efficiency based on format compatibility
360 if (from_format == to_format)
361 return 100;
362
363 // Higher BPP to lower BPP conversions may lose quality
364 if (static_cast<int>(from_format) > static_cast<int>(to_format)) {
365 int bpp_diff = static_cast<int>(from_format) - static_cast<int>(to_format);
366 return std::max(
367 20, 100 - (bpp_diff * 20)); // Reduce efficiency by 20% per BPP level
368 }
369
370 // Lower BPP to higher BPP conversions are lossless
371 return 100;
372}
373
375 ImGui::Text("Format: %s", info.name.c_str());
376 ImGui::Text("Bits per Pixel: %d", info.bits_per_pixel);
377 ImGui::Text("Max Colors: %d", info.max_colors);
378 ImGui::Text("Bytes per Tile: %d", info.bytes_per_tile);
379 ImGui::Text("Compressed: %s", info.is_compressed ? "Yes" : "No");
380 ImGui::Text("Description: %s", info.description.c_str());
381}
382
383void BppFormatUI::RenderColorUsageChart(const std::vector<int>& color_usage) {
384 // Find maximum usage for scaling
385 int max_usage = *std::max_element(color_usage.begin(), color_usage.end());
386 if (max_usage == 0)
387 return;
388
389 // Render simple bar chart
390 ImGui::Text("Color Usage Distribution:");
391
392 for (size_t i = 0; i < std::min(color_usage.size(), size_t(16)); ++i) {
393 if (color_usage[i] > 0) {
394 float usage_ratio = static_cast<float>(color_usage[i]) / max_usage;
395 ImGui::Text("Color %zu: %d pixels (%.1f%%)", i, color_usage[i],
396 (static_cast<float>(color_usage[i]) / (16 * 16)) * 100.0f);
397 ImGui::SameLine();
398 ImGui::ProgressBar(usage_ratio, ImVec2(100, 0));
399 }
400 }
401}
402
403void BppFormatUI::RenderConversionHistory(const std::string& history) {
404 ImGui::Text("Conversion History:");
405 ImGui::TextWrapped("%s", history.c_str());
406}
407
411
413 switch (format) {
415 return ImVec4(1, 0, 0, 1); // Red
417 return ImVec4(1, 1, 0, 1); // Yellow
419 return ImVec4(0, 1, 0, 1); // Green
421 return ImVec4(0, 0, 1, 1); // Blue
422 default:
423 return ImVec4(1, 1, 1, 1); // White
424 }
425}
426
428 int sheet_id, const gfx::GraphicsSheetAnalysis& analysis) {
429 cached_analysis_[sheet_id] = analysis;
430}
431
432// BppConversionDialog implementation
433
435 : id_(id),
436 is_open_(false),
437 target_format_(gfx::BppFormat::kBpp8),
438 preserve_palette_(true),
439 preview_valid_(false),
440 show_preview_(true),
441 preview_scale_(1.0f) {}
442
444 const gfx::Bitmap& bitmap, const gfx::SnesPalette& palette,
445 std::function<void(gfx::BppFormat, bool)> on_convert) {
446 source_bitmap_ = bitmap;
447 source_palette_ = palette;
448 convert_callback_ = on_convert;
449 is_open_ = true;
450 preview_valid_ = false;
451}
452
454 if (!is_open_)
455 return false;
456
457 ImGui::OpenPopup("BPP Format Conversion");
458
459 if (ImGui::BeginPopupModal("BPP Format Conversion", &is_open_,
460 ImGuiWindowFlags_AlwaysAutoResize)) {
462 ImGui::Separator();
464 ImGui::Separator();
465
466 if (show_preview_) {
468 ImGui::Separator();
469 }
470
472
473 ImGui::EndPopup();
474 }
475
476 return is_open_;
477}
478
480 if (preview_valid_)
481 return;
482
485
486 if (current_format == target_format_) {
488 preview_valid_ = true;
489 return;
490 }
491
492 auto converted_data = gfx::BppFormatManager::Get().ConvertFormat(
493 source_bitmap_.vector(), current_format, target_format_,
495
498 source_bitmap_.depth(), converted_data, source_palette_);
499 preview_valid_ = true;
500}
501
503 ImGui::Text("Convert to BPP Format:");
504
505 const char* format_names[] = {"2BPP", "3BPP", "4BPP", "8BPP"};
506 int current_selection = static_cast<int>(target_format_) - 2;
507
508 if (ImGui::Combo("##TargetFormat", &current_selection, format_names, 4)) {
509 target_format_ = static_cast<gfx::BppFormat>(current_selection + 2);
510 preview_valid_ = false; // Invalidate preview
511 }
512
513 const auto& format_info =
515 ImGui::Text("Max Colors: %d", format_info.max_colors);
516 ImGui::Text("Description: %s", format_info.description.c_str());
517}
518
520 if (ImGui::Button("Update Preview")) {
521 preview_valid_ = false;
522 }
523
525
527 ImGui::Text("Preview:");
528 ImGui::Image((ImTextureID)(intptr_t)preview_bitmap_.texture(),
529 ImVec2(128 * preview_scale_, 128 * preview_scale_));
530
531 ImGui::SliderFloat("Scale", &preview_scale_, 0.5f, 3.0f);
532 }
533}
534
536 ImGui::Checkbox("Preserve Palette", &preserve_palette_);
537 ImGui::SameLine();
538 ImGui::Checkbox("Show Preview", &show_preview_);
539}
540
542 if (ImGui::Button("Convert")) {
543 if (convert_callback_) {
545 }
546 is_open_ = false;
547 }
548
549 ImGui::SameLine();
550 if (ImGui::Button("Cancel")) {
551 is_open_ = false;
552 }
553}
554
555// BppComparisonTool implementation
556
558 : id_(id),
559 is_open_(false),
560 has_source_(false),
561 comparison_scale_(1.0f),
562 show_metrics_(true),
563 selected_comparison_(gfx::BppFormat::kBpp8) {}
564
566 const gfx::SnesPalette& palette) {
567 source_bitmap_ = bitmap;
568 source_palette_ = palette;
569 has_source_ = true;
571}
572
574 if (!is_open_ || !has_source_)
575 return;
576
577 ImGui::Begin("BPP Format Comparison", &is_open_);
578
580 ImGui::Separator();
582
583 if (show_metrics_) {
584 ImGui::Separator();
586 }
587
588 ImGui::End();
589}
590
594
595 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
596 if (format == source_format) {
599 comparison_valid_[format] = true;
600 continue;
601 }
602
603 try {
604 auto converted_data = gfx::BppFormatManager::Get().ConvertFormat(
605 source_bitmap_.vector(), source_format, format,
607
608 comparison_bitmaps_[format] =
610 source_bitmap_.depth(), converted_data, source_palette_);
612 comparison_valid_[format] = true;
613 } catch (...) {
614 comparison_valid_[format] = false;
615 }
616 }
617}
618
620 ImGui::Text("Format Comparison (Scale: %.1fx)", comparison_scale_);
621 ImGui::SliderFloat("##Scale", &comparison_scale_, 0.5f, 3.0f);
622
623 ImGui::Columns(2, "ComparisonColumns");
624
625 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
626 auto it = comparison_bitmaps_.find(format);
627 if (it == comparison_bitmaps_.end() || !comparison_valid_[format])
628 continue;
629
630 const auto& bitmap = it->second;
631 const auto& format_info =
633
634 ImGui::Text("%s", format_info.name.c_str());
635
636 if (bitmap.texture()) {
637 ImGui::Image((ImTextureID)(intptr_t)bitmap.texture(),
638 ImVec2(128 * comparison_scale_, 128 * comparison_scale_));
639 }
640
641 ImGui::NextColumn();
642 }
643
644 ImGui::Columns(1);
645}
646
648 ImGui::Text("Format Metrics:");
649
650 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
651 if (!comparison_valid_[format])
652 continue;
653
654 const auto& format_info =
656 std::string metrics = CalculateMetrics(format);
657
658 ImGui::Text("%s: %s", format_info.name.c_str(), metrics.c_str());
659 }
660}
661
663 ImGui::Text("Selected for Analysis: ");
664 ImGui::SameLine();
665
666 const char* format_names[] = {"2BPP", "3BPP", "4BPP", "8BPP"};
667 int selection = static_cast<int>(selected_comparison_) - 2;
668
669 if (ImGui::Combo("##SelectedFormat", &selection, format_names, 4)) {
670 selected_comparison_ = static_cast<gfx::BppFormat>(selection + 2);
671 }
672
673 ImGui::SameLine();
674 ImGui::Checkbox("Show Metrics", &show_metrics_);
675}
676
678 const auto& format_info = gfx::BppFormatManager::Get().GetFormatInfo(format);
679 int bytes = (source_bitmap_.width() * source_bitmap_.height() *
680 format_info.bits_per_pixel) /
681 8;
682
683 std::ostringstream metrics;
684 metrics << bytes << " bytes, " << format_info.max_colors << " colors";
685
686 return metrics.str();
687}
688
689} // namespace gui
690} // namespace yaze
Represents a bitmap image optimized for SNES ROM hacking.
Definition bitmap.h:67
TextureHandle texture() const
Definition bitmap.h:380
const std::vector< uint8_t > & vector() const
Definition bitmap.h:381
int height() const
Definition bitmap.h:374
int width() const
Definition bitmap.h:373
int depth() const
Definition bitmap.h:375
BppFormat DetectFormat(const std::vector< uint8_t > &data, int width, int height)
Detect BPP format from bitmap data.
std::vector< BppFormat > GetAvailableFormats() const
Get all available BPP formats.
GraphicsSheetAnalysis AnalyzeGraphicsSheet(const std::vector< uint8_t > &sheet_data, int sheet_id, const SnesPalette &palette)
Analyze graphics sheet to determine original and current BPP formats.
std::vector< uint8_t > ConvertFormat(const std::vector< uint8_t > &data, BppFormat from_format, BppFormat to_format, int width, int height)
Convert bitmap data between BPP formats.
static BppFormatManager & Get()
const BppFormatInfo & GetFormatInfo(BppFormat format) const
Get BPP format information.
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
gfx::BppFormat selected_comparison_
std::string CalculateMetrics(gfx::BppFormat format) const
std::unordered_map< gfx::BppFormat, gfx::Bitmap > comparison_bitmaps_
gfx::SnesPalette source_palette_
void Render()
Render the comparison tool.
void SetSource(const gfx::Bitmap &bitmap, const gfx::SnesPalette &palette)
Set source bitmap for comparison.
std::unordered_map< gfx::BppFormat, gfx::SnesPalette > comparison_palettes_
std::unordered_map< gfx::BppFormat, bool > comparison_valid_
BppComparisonTool(const std::string &id)
Constructor.
std::function< void(gfx::BppFormat, bool)> convert_callback_
BppConversionDialog(const std::string &id)
Constructor.
bool Render()
Render the dialog.
void Show(const gfx::Bitmap &bitmap, const gfx::SnesPalette &palette, std::function< void(gfx::BppFormat, bool)> on_convert)
Show the conversion dialog.
bool RenderFormatSelector(gfx::Bitmap *bitmap, const gfx::SnesPalette &palette, std::function< void(gfx::BppFormat)> on_format_changed)
Render the BPP format selection UI.
void RenderAnalysisPanel(const gfx::Bitmap &bitmap, const gfx::SnesPalette &palette)
Render format analysis panel.
int GetConversionEfficiency(gfx::BppFormat from_format, gfx::BppFormat to_format) const
Get conversion efficiency score.
void RenderSheetAnalysis(const std::vector< uint8_t > &sheet_data, int sheet_id, const gfx::SnesPalette &palette)
Render graphics sheet analysis.
BppFormatUI(const std::string &id)
Constructor.
ImVec4 GetFormatColor(gfx::BppFormat format) const
std::string GetFormatDescription(gfx::BppFormat format) const
std::string last_analysis_sheet_
bool IsConversionAvailable(gfx::BppFormat from_format, gfx::BppFormat to_format) const
Check if format conversion is available.
void RenderConversionHistory(const std::string &history)
void RenderFormatInfo(const gfx::BppFormatInfo &info)
void UpdateAnalysisCache(int sheet_id, const gfx::GraphicsSheetAnalysis &analysis)
std::unordered_map< int, gfx::GraphicsSheetAnalysis > cached_analysis_
void RenderConversionPreview(const gfx::Bitmap &bitmap, gfx::BppFormat target_format, const gfx::SnesPalette &palette)
Render conversion preview.
gfx::BppFormat preview_format_
gfx::BppFormat selected_format_
void RenderColorUsageChart(const std::vector< int > &color_usage)
BppFormat
BPP format enumeration for SNES graphics.
@ kBpp4
4 bits per pixel (16 colors)
@ kBpp3
3 bits per pixel (8 colors)
@ kBpp2
2 bits per pixel (4 colors)
@ kBpp8
8 bits per pixel (256 colors)
ImVec4 GetSuccessColor()
Definition ui_helpers.cc:21
ImVec4 GetErrorColor()
Definition ui_helpers.cc:31
ImVec4 GetWarningColor()
Definition ui_helpers.cc:26
BPP format metadata and conversion information.
Graphics sheet analysis result.