HDFTOPAL(1)
π HDFTOPAL(1) π
General Commands Manual β¨
π NAME π
hdftopal, paltohdf β bestie, these two convert between a palette in an HDF file and a raw palette in a non-HDF file π¨π¦
β¨ SYNOPSIS β¨
hdftopal hdf-pallette-file raw-pallette-file
paltohdf raw-pallette-file hdf-pallette-file
Like, two commands, one job each, no cap π
π«Ά DESCRIPTION π«Ά
hdftopal takes a palette that lives inside an HDF file and turns it into a raw palette sitting in a non-HDF file. And the raw palette it spits out? It's 768 bytes long, okay, and here's the layout, listen:
- the first 256 bytes are the red intensity values π₯
- the second 256 bytes are the green intensity values πΏ
- the third 256 bytes are the blue intensity values π
paltohdf does the exact opposite glow-up β raw palette data in, HDF palette format out. But heads up bestie, the raw palette data you feed it must have 768 bytes, and it has to be organized in this order, fr fr:
- first, 256 contiguous red intensity values
- then, 256 contiguous green intensity values
- then, 256 contiguous blue intensity values
Meanwhile the palette that ends up in the HDF file has its RGB values pixel-interlaced, like this:
red-value green-value blue-value red-value green-value blue-value...
And yes, this is literally the standard HDF format for 8-bit palettes π iykyk.
π Okay so important vibe check about the HDF file itself: if you point it at an HDF palette format file that doesn't exist, it gets created before the converted data is stored β so it just appears, iconic. But if you point it at an HDF palette format file that already exists, the converted data gets appended to the file. Appended!! Not overwritten!! Don't come crying to me later π
πΈ SEE ALSO πΈ
hdf(5)β go read it, it's giving lore π
no thoughts, just palette conversions π§π that's the whole manual bestie, go slay
November 6, 1999 β yeah she's vintage but she still ate π β¨ periodt
π¦ where this page comes from
- debian bookworm: hdf4-tools 4.2.15-5 Β· HDF4
- debian trixie: hdf4-tools 4.3.0-1+b1 Β· HDF4
- ubuntu jammy: hdf4-tools 4.2.15-4 Β· HDF4
- ubuntu noble: hdf4-tools 4.2.16-4build1 Β· HDF4
- ubuntu questing: hdf4-tools 4.3.0-1
- ubuntu resolute: hdf4-tools 4.3.1-2 Β· HDF4
- ubuntu stonking: hdf4-tools 4.3.1-3 Β· HDF4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms