Files
settled-reach/.claude/skills/image-gen/references/dds-conversion.md
T
jpmschweitzerandClaude Opus 4.6 f0bab3999d chore(skills): rename all skills to domain-action convention
Adopts the whatsinagame naming pattern where the domain comes
first and the action second (e.g. pr-review, sprint-start,
audio-gen). Updated all cross-references in settings, agents,
docs, and inter-skill references.

12 renames: commit→git-commit, create-skill→skill-create,
gen-audio→audio-gen, gen-image→image-gen, plan-sprint→sprint-plan,
push-pr→pr-push, render-sprite→sprite-gen, review-pr→pr-review,
search-docs→docs-search, start-sprint→sprint-start,
start-workshop→workshop-start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 12:51:56 +01:00

59 lines
2.2 KiB
Markdown

# PNG to DDS Conversion
The `generate_image` tool outputs PNG. CK3 requires DDS. Convert after generation.
## DDS Format by Asset Type
| Asset Type | DDS Format | Mipmaps |
|------------|-----------|---------|
| Trait icons (120x120) | B8G8R8A8_UNORM (uncompressed ARGB) | No |
| Modifier icons (60x60) | B8G8R8A8_UNORM (uncompressed ARGB) | Yes (6 levels) |
| Faith icons (100x100) | B8G8R8A8_UNORM | No |
| CoA emblems (128x128) | B8G8R8A8_UNORM (Linear) | No |
| Building icons (60x60) | B8G8R8A8_UNORM | No |
| MaA icons (60x60) | B8G8R8A8_UNORM | No |
| Decision illustrations | BC1_UNORM (DXT1) | No |
| Event backgrounds | BC1_UNORM (DXT1) | No |
| Loading screens | BC1_UNORM (DXT1) | No |
| Bookmark backgrounds | BC1_UNORM (DXT1) | No |
| Bookmark overlays | BC3_UNORM (DXT5) | No |
| Tenet icons (260x400) | BC3_UNORM (DXT5) | No |
| Portrait textures | BC3_UNORM (DXT5) | Yes |
| Frontend art | BC1_UNORM (DXT1) | No |
## Conversion with ImageMagick (Linux)
ImageMagick 7 with the `dds` delegate can write DDS files:
```bash
# Uncompressed ARGB, no mipmaps (trait icons, faith icons, CoA emblems)
magick input.png -define dds:compression=none -define dds:mipmaps=0 output.dds
# DXT1 opaque, no mipmaps (decisions, events, loading screens)
magick input.png -define dds:compression=dxt1 -define dds:mipmaps=0 output.dds
# DXT5 with alpha, no mipmaps (bookmark overlays, tenet icons)
magick input.png -define dds:compression=dxt5 -define dds:mipmaps=0 output.dds
# Uncompressed ARGB with mipmaps (modifier icons)
magick input.png -define dds:compression=none -define dds:mipmaps=6 output.dds
```
## Resize / Crop with ImageMagick
```bash
# Resize to exact pixel dimensions
magick input.png -resize 120x120! output.png
# Center-crop from a wider source
magick input.png -gravity center -crop 1100x440+0+0 +repage output.png
```
## Common Pitfalls
- Trait icons MUST be uncompressed ARGB, not DXT5 — wrong format = invisible in-game
- CoA emblems MUST be uncompressed ARGB or the color mask tinting system breaks
- Modifier icons need mipmaps; trait icons do not
- Filenames are case-sensitive on Linux — match exactly what mod code references
- Check `magick identify` output to verify format and dimensions after conversion