1 |
On 05/06/2011 12:05 AM, Paul Hartman wrote: |
2 |
> Doesn't Netpbm satisfy your criteria? It's the very first program on |
3 |
> the list of "good" software in that web page. |
4 |
|
5 |
I have a had a closer look at netpbm's pamscale now. |
6 |
|
7 |
|
8 |
pamscale doesn't support PNG input out of the box: |
9 |
|
10 |
"pamscale: bad magic number 0x8950 - not a PAM, PPM, PGM, or PBM file" |
11 |
|
12 |
So to let pamscale operate on my PNG it seems I would need to run this |
13 |
|
14 |
# pngtopam in.png > in.pam |
15 |
# pamscale [..] in.pam > out.pam |
16 |
# pamtopnm out.pam > out.pnm |
17 |
# pnmtopng out.pnm > out.png |
18 |
|
19 |
I haven't checked yet if that preserves transparency. |
20 |
|
21 |
While there is a tool pamrgbatopng shipped with netpbm it didn't like my |
22 |
out.pam produced above: |
23 |
|
24 |
"pamrgbatopng: PAM must have depth at least 4 (red, green, blue, |
25 |
alpha). This one has depth 3" |
26 |
|
27 |
Interestingly netpbm tools point to a respective man page when run with |
28 |
--help, which points to a man-like website with the real content. So it |
29 |
seems without internet the tool is effectively unusable. Great. |
30 |
|
31 |
I'm also not sure if I really want to add 300 binary files from a single |
32 |
package: |
33 |
|
34 |
# equery f media-libs/netpbm | grep '^/usr/bin' | wc -l |
35 |
331 |
36 |
|
37 |
Best, |
38 |
|
39 |
|
40 |
|
41 |
Sebastian |