Skip to content

Commit

Permalink
Improve GS Finder icon file rendering
Browse files Browse the repository at this point in the history
Some very large ICN files were failing to render because the total
height exceeded the internal 4096x4096 bitmap size limit.  We now
break large icon grids into chunks 20 rows high.
  • Loading branch information
fadden committed Jun 20, 2024
1 parent a4a5a03 commit 0cc812c
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 72 deletions.
3 changes: 2 additions & 1 deletion FileConv/Gfx/GSFinderIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ private static IConvOutput RenderIconGrid(IconFile iconFile, Notes loadNotes) {
// One row per icon entry, 4 columns each.
ImageGrid.Builder bob = new ImageGrid.Builder();
bob.SetGeometry(maxIconWidth, maxIconHeight, NUM_COLS);
bob.SetChunkGeometry(20, 16);
bob.SetRange(0, iconFile.IconRecords.Count * NUM_COLS);
bob.SetColors(ICON_PALETTE, COLOR_FRAME, COLOR_BKGND, COLOR_FRAME, COLOR_FRAME);
bob.SetColors(ICON_PALETTE, COLOR_FRAME, COLOR_BKGND, COLOR_FRAME, COLOR_BKGND);
bob.SetLabels(hasLeftLabels: true, hasTopLabels: false, leftLabelIsRow: true, 10);
ImageGrid grid;
try {
Expand Down
Loading

0 comments on commit 0cc812c

Please sign in to comment.