1PSSVG(1)                         User commands                        PSSVG(1)
2
3
4

NAME

6       pssvg - convert Photoshop® gradients to SVG.
7

SYNOPSIS

9       pssvg [-b rgb] [-f rgb] [-h] [-o file] [-t format] [-v] [-V] file
10

DESCRIPTION

12       The pssvg program converts Photoshop grd5 gradients to the SVG format.
13       Unlike most of the other file formats handled by the cptutils package,
14       grd5 files may contain multiple gradients and all of the input
15       gradients will be converted to gradients in the output file. One can
16       then use svgx(1) to extract single gradients and convert them to other
17       formats.
18
19       Photoshop gradient files will often contain a number of gradients with
20       the same name. These names are used as the basis for the SVG titles
21       (the id attributes), but since these must be unique, the program will
22       append _01, _02, ... to duplicate names in order to form the titles.
23       Alternatively once can employ the --title option to generate a uniform
24       sequence of titles.
25
26       Atypically, the input Photoshop grd5 file is a mandatory argument. The
27       program will write to stdout if the --output option is not specified.
28

OPTIONS

30       In the following, all rgb specifications should be of the form
31       red/green/blue where the colour components are integers in the range 0
32       to 255.
33
34       -b, --background rgb
35           Set the background colour of the output.
36
37       --backtrace-file path
38           Specify a file to which to write a formatted backtrace. The file
39           will only be created if there is a backtrace created, typically
40           when an error occurs.
41
42       --backtrace-format format
43           Specify the format of the backtrace written to the files specified
44           by --backtrace-file, one of plain, xml or json.
45
46       -f, --foreground rgb
47           Set the foreground colour of the output.
48
49       -h, --help
50           Brief help.
51
52       -o, --output file
53           Write the output to file, rather than stdout.
54
55       -t, --title format
56           This option generates the SVG gradient titles (the id attributes)
57           according to the specified format.
58
59           The format argument should be a printf(3) format string containing
60           a single integer directive (and that directive will be replaced by
61           the gradient number). Thus "gradient-%03i" will produce ids
62           "gradient-001", "gradient-002", ...
63
64       -v, --verbose
65           Verbose operation.
66
67       -V, --version
68           Version information.
69

EXAMPLE

71       Convert a Photoshop gradient, foo.grd, to a set of GIMP gradients,
72       foo-001.ggr, foo-002.ggr, ...
73
74           pssvg -v -t "foo-%03i" -o tmp.svg foo.grd
75           svggimp -v -a tmp.svg
76

CAVEATS

78       The program handles RGB, HSB, LAB, CMYK and greyscale colour stops,
79       converting them all to RGB and then merging the results with the
80       opacity channel to create SVG RGBA stops. Conversion of non-RGB stops
81       is naive and takes no account of colour profiles, so the results are
82       generally sub-optimal. Integration of a CMS (colour management system)
83       into the program to perform these conversions is under investigation.
84
85       The program does not handle "Book Colours" (PANTONE, COLOR FINDER, etc)
86       for legal reasons.
87
88       The SVG output format does not support back/foreground colours;
89       consequently, if the input specifies any stops with back/fairground
90       colours then these will be converted to the colour specified by the
91       --background and --foreground options, respectively.
92
93       The smoothness parameter used by Photoshop (which seems to parameterise
94       some kind of spline) is not yet handled; the output contains only
95       linear splines (corresponding to a smoothness of 0%). The result is
96       that the SVG output will sometimes look more "angular" than the
97       Photoshop input. Fixing this will require research into the precise
98       nature of the spline parameterisation used in the input.
99
100       Noise gradients would seem to be difficult to convert to SVG without
101       using a huge number of stops in the output, so these will probably not
102       be supported by this program.
103

NOTES

105       Adobe Photoshop® is a trademark of Adobe Systems Inc.  PANTONE® is a
106       trademark of Pantone LLC.  COLOR FINDER® is a trademark of Toyo Ink
107       Mfg. Co., Ltd.
108
109       This program was written using the reverse-engineered specification of
110       the grd5 format by Valek Filippov, Alexandre Prokoudine and Michel
111       Mariani.
112

AUTHOR

114       J. J. Green
115

SEE ALSO

117       svgx(1).
118
119
120
121CPTUTILS                         7 August 2019                        PSSVG(1)
Impressum