Nodes/ComfyUI_StarNodes/⭐ Star Icon Exporter
ComfyUI Node

⭐ Star Icon Exporter

One generated square in, a whole icon set out — PNGs and .ico in one run

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Icon Exporter
  • images
  • ico_path
  • preview_batch
save_nameicon
quantize_to_256true
extra_sizes
subfolderIcons
shapenone
rounded_radius_percent20
background_color#FFFFFF
padding_percent0
auto_trimtrue
stroke_enabledfalse
stroke_color#000000
stroke_width_percent6
shadow_enabledfalse
shadow_color#000000
shadow_offset_px2
shadow_blur_px4
presetstandard
naming_styleincrement
export_web_faviconsfalse
preview_size256

Every once in a while you generate something and think "that would make a perfect app icon." Then you remember what shipping an icon actually involves: a dozen differently-sized PNGs, a .ico file, maybe a rounded-corner mask, and a favicon. Star Icon Exporter does the whole boring pipeline on the canvas - you give it one image, it writes the whole size ladder to disk and hands you the path.

How it works

Feed it an images input (the first frame of the batch is used, per the tooltip) and a save_name. It resizes that base image with Lanczos down to every size in a preset pack - standard (16/32/48/128/256), windows, android, ios, or web_favicon - writes each as a PNG into a subfolder under ComfyUI's output dir, and packs a .ico containing the sizes. extra_sizes lets you append custom ones as a comma-separated list ("64,512"), and quantize_to_256 (on by default) converts to a 256-color palette to keep files small - useful, since a 1024px app icon as truecolor PNG is needlessly fat.

The shaping options are where it stops being a dumb resizer. shape does square, circle, or rounded; the tooltip spells out the behavior: square fills the background (with background_color, default #FFFFFF) while circle/rounded keep transparency. padding_percent insets the art, auto_trim snips transparent edges before shaping, and there's a proper stroke (outline) and shadow (offset + blur) if you want the icon to sit on a background rather than float. A preset subfolder keeps each platform's output separate, and naming_style (increment / underscore_increment / timestamp) stops you overwriting the same file on repeat runs.

Inputs that matter

  • images + save_name - the art and the base filename. Everything else is optional.
  • preset + extra_sizes - the size ladder. Set the platform, add oddballs.
  • shape - the difference between a raw square and something you'd actually ship.

Outputs

  • ico_path (STRING) - where the .ico landed. You can wire this into a text display node or an API flow to know the file location.
  • preview_batch (IMAGE) - all generated sizes stacked as a batch, so you can eyeball them in a Preview node. preview_size picks which size is shown.

Installing

It's part of the StarNodes pack - install Starnodes via ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
cd ComfyUI_StarNodes
pip install -r requirements.txt

Restart and search star on the canvas. Pure Pillow under the hood - no models, no downloads.

Common issues

If your output folder is a mess, remember the subfolder default is Icons, plus a per-preset subfolder - check ComfyUI/output/Icons/. Icons with an alpha channel stay transparent only if you keep shape at circle/rounded (or none) - picking square fills that background color over your transparency, which surprises people the first time. And if your PNGs are unexpectedly heavy, quantize_to_256 was turned off; that's the setting that tames file size.

Category⭐StarNodes/Image And Latent

Inputs (21)

NameTypeDefaultDescription
imagesIMAGEImage input (first image in batch will be used).
save_nameSTRINGiconBase filename without extension.
quantize_to_256optBOOLEANtrueQuantize to 256 colors for smaller files.
extra_sizesoptSTRINGComma-separated extra sizes, e.g. 64,512
subfolderoptSTRINGIconsOptional output subfolder under ComfyUI output.
shapeoptCOMBOnoneApply icon shape. 'square' fills background, 'circle'/'rounded' keep transparent background.
rounded_radius_percentoptINT200–50Corner radius as percent of icon size (for rounded).
background_coloroptSTRING#FFFFFFHEX color for square background (e.g. #000000).
padding_percentoptINT00–40Uniform padding as percent of icon size.
auto_trimoptBOOLEANtrueAuto-trim transparent edges before shaping.
stroke_enabledoptBOOLEANfalseDraw an outline around the shape.
stroke_coloroptSTRING#000000Outline color (HEX).
stroke_width_percentoptINT60–20Outline width as percent of icon size.
shadow_enabledoptBOOLEANfalseAdd a drop shadow behind the shape.
shadow_coloroptSTRING#000000Shadow color (HEX).
shadow_offset_pxoptINT2-20–20Shadow offset in pixels.
shadow_blur_pxoptINT40–32Shadow blur radius in pixels.
presetoptCOMBOstandardPreset size packs to include.
naming_styleoptCOMBOincrementHow to avoid overwriting existing files.
export_web_faviconsoptBOOLEANfalseAlso export common web favicon PNG sizes.
preview_sizeoptINT2568–1024Preview size to show in node (closest available will be chosen).

Outputs (2)

NameTypeDescription
ico_pathSTRING
preview_batchIMAGE