-
Notifications
You must be signed in to change notification settings - Fork 62
-
I see that by default the ppm format is P6. How do I change it?
.write_to_file "temp.ppm[format=P5]"
ppmsave: no property named `format' (Vips::Error)
.write_to_file "temp.ppm", format: "P5"
unable to call VipsForeignSavePpmFile: unknown option format (Vips::Error)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
Hi @Nakilon,
It's done from the file extension, so .pfm
saves as float, for example. There's also pgm
, pbm
, .pgm
. and .ppm
.
8.14 has a new feature where saving as .pnm
will automatically use the best format for your data.
https://github.com/libvips/libvips/blob/gh-pages-8.14/_posts/2022-12-22-What's-new-in-8.14.md#other
Beta Was this translation helpful? Give feedback.
All reactions
-
Oh, format
should work too. I see:
$ vips copy k2.jpg x.ppm[format=pfm]
$ more x.ppm
PF
#vips2ppm - 2022年12月24日T11:31:30.717226Z
1450 2048
-1
...
Maybe you have an old version of libvips? format
was added in 8.13.
Beta Was this translation helpful? Give feedback.
All reactions
-
Oh, yes, it's vips-8.11.3-Wed Aug 11 09:29:27 UTC 2021
Beta Was this translation helpful? Give feedback.