1RASGETPAL(1NCARG) NCAR VIEW RASGETPAL(1NCARG)
2
3
4
6 rasgetpal - extract the color palette of a rasterfile and write it to
7 standard output
8
10 rasgetpal [-Version] srcfile [dstfile]
11
13 Given srcfile and no dstfile, rasgetpal will extract the color palette
14 from srcfile and print it in textual form to standard output. Given
15 srcfile and dstfile, rasgetpal will extract the color palette from src‐
16 file and save it in file dstfile. If the extension of dstfile is
17 ".txt", the color palette is saved in textual form. If it is ".pal",
18 the palette is saved in a binary HDF-compatible format.
19
20 Once you have a ".pal" color palette you can use it with NCSA's XImage
21 or any other application that uses this format of color palette. A tex‐
22 tual color palette can be edited using a standard text editor and then
23 fed back to ctrans, rasview, or rascat in order to get a modified color
24 palette. It's also useful when you simply want to know what's in your
25 color palette. See "man ras_palette" for more information on these dif‐
26 ferent formats.
27
29 -help Print help information.
30
31 -Version
32 Print the version number.
33
34
36 Let's suppose you have an X Window Dump rasterfile called window.xwd
37 and you'd like to get a textual copy of the color palette.
38
39 % rasgetpal window.xwd window.txt
40 % vi window.txt /* edit the color table */
41 % rasview -pal window.txt window.xwd
42
43
44 You could also use the command below to get the same palette file:
45
46 % rasgetpal window.xwd >window.txt
47
48
49 Now suppose you'd like to get an HDF-compatible binary palette from
50 "window.xwd":
51
52 % rasgetpal window.xwd new.pal
53
54
56 A color map can be extracted from indexed rasterfiles but not from
57 direct-color rasterfiles.
58
59
61 rasview(1NCARG), rascat(1NCARG), rasls(1NCARG), rassplit(1NCARG),
62 ras_formats(5NCARG), ras_palette(5NCARG)
63
64 Hardcopy: NCAR Graphics Fundamentals, UNIX Version
65
67 Copyright (C) 1987-2007
68 University Corporation for Atmospheric Research
69
70 This documentation is free software; you can redistribute it and/or
71 modify it under the terms of the GNU General Public License as pub‐
72 lished by the Free Software Foundation; either version 2 of the
73 License, or (at your option) any later version.
74
75 This software is distributed in the hope that it will be useful, but
76 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
77 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
78 Public License for more details.
79
80 You should have received a copy of the GNU General Public License along
81 with this software; if not, write to the Free Software Foundation,
82 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
83
84
85
86
87NCARG January 1993 RASGETPAL(1NCARG)