RASGETPAL(1NCARG)
β¨ rasgetpal β the palette extractor bestie π
okay so this is rasgetpal(1NCARG), living in the NCAR VIEW manual, and it is literally the girl who reaches into your rasterfile and pulls out its color palette. iconic behavior. π
π NAME π
rasgetpal β extract the color palette of a rasterfile and write it to standard output. that's it. that's the whole job. and she does it flawlessly. π«Ά
β¨ SYNOPSIS β¨
rasgetpal [-Version] srcfile [dstfile]
πΈ DESCRIPTION πΈ
so here's the vibe. you hand her srcfile and you don't hand her a dstfile? she takes the color palette out of srcfile and prints it in textual form straight to standard output. boom. done. no cap. π
but if you give her both srcfile and dstfile, she extracts the color palette from srcfile and saves it in the file dstfile. and the extension is the whole personality here:
- if the extension of
dstfileis.txt, the color palette gets saved in textual form β¨ - if it's
.pal, the palette gets saved in a binary HDF-compatible format π₯
so once you've got yourself a .pal color palette, you can use it with NCSA's XImage or literally any other application that uses this format of color palette. she plays well with others, we love that for her. π₯°
and a textual color palette? oh that's the fun one. you can edit it with a standard text editor and then feed it back into ctrans, rasview, or rascat to get a modified color palette. it's also super useful when you just wanna know what's actually in your color palette. like a little peek inside. π
if you want more info on these different formats, go read man ras_palette. she goes deeper. π
π OPTIONS π
-helpβ prints help information. your girl is helpful. π-Versionβ prints the version number. so you know exactly which queen you're working with. π
π¦ EXAMPLE π¦
okay let's pretend you've got an X Window Dump rasterfile called window.xwd and you want a textual copy of the color palette. say less.
% rasgetpal window.xwd window.txt
% vi window.txt /* edit the color table */
% rasview -pal window.txt window.xwd
and you could also use the command below to get the exact same palette file:
% rasgetpal window.xwd >window.txt
same energy. same palette. different route. periodt. π
now say you want an HDF-compatible binary palette out of window.xwd:
% rasgetpal window.xwd new.pal
and boom, she ate. π₯
π CAVEATS π
listen. a color map can be extracted from indexed rasterfiles, but not from direct-color rasterfiles. so if you're out here trying that on a direct-color rasterfile, it's not gonna happen bestie, and that's not a vibe. π
π SEE ALSO π
rasview(1NCARG)rascat(1NCARG)rasls(1NCARG)rassplit(1NCARG)ras_formats(5NCARG)ras_palette(5NCARG)
Hardcopy: NCAR Graphics Fundamentals, UNIX Version
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
okay that's the whole page, no notes. this was the NCARG version, from January 1993, filed under RASGETPAL(1NCARG). she's been serving since '93 and she's still booked and busy. mwah. πβ¨π¦
π¦ where this page comes from
- epel 9: ncl-common 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-common 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-common 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms