I am trying to pipe some of my commands with gdal_translate's output. These commands should read from standard input, so I'm writing to /vsistdout/. However, I am getting some errors. To be a bit more generic, I tried some other commands to illustrate the issues I face:
$ gdal_translate -of JPEG2000 Lenna.png /vsistdout/ | gdal_translate -of PNG /vsistdin/ Lenna01.png
ERROR 6: Read or update mode not supported on /vsistdout
ERROR 3: Unable to create file /vsistdout/.
ERROR 4: `/vsistdin/' not recognised as a supported file format.
GDALOpen failed - 4
`/vsistdin/' not recognised as a supported file format.
However, the following works:
$ gdal_translate -of JPEG Lenna.png /vsistdout/ | gdal_translate -of PNG /vsistdin/ Lenna0.png
Input file size is 512, 512
0...10...20...30...40...50...60...70...80...90...100 - done.
(In my tests, I am using my image format, which gets the same error as JPEG2000).
Is it that gdal_translate has a per-format support of the /vsistdout/ (and /vsistdin/) parameter?