Hi,
I'm trying to convert some raw (.gray, .rgb) images to ppm/pgm files. For gray images, I do something like
convert -size 1024x976 -depth 8 af1.gray af1.pgm
This works fine, however, I want to be able to have other options such as:
1.) specify file header size (meaning convert.exe will ignore the specified number of bytes at the beginning before converting the raw to pnm)
2.) For .rgb images, I would like to specific things like color order (RGB or BGR), Interleaved (RGB RGB... ) or Planar (RRR... GGG... BBB...), etc.
I'm not sure if ImageMagick has this type of options for converting raw to pnm. I was having trouble finding them.
Thanks for your time,
onyee
Raw GRAY/RGB images
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
There are othe runix commands that can handle file streams.
For example the UNIX 'dd' command can be used to remove 'X' bytes from the start of a character stream.
If the file is line orientated the comman 'tail' can be used to ignore say the first 2 lines
of a file.
IM Commands can read images from pipelines do you can just 'pipe' the output of one of these filters into IM.
For example the UNIX 'dd' command can be used to remove 'X' bytes from the start of a character stream.
If the file is line orientated the comman 'tail' can be used to ignore say the first 2 lines
of a file.
IM Commands can read images from pipelines do you can just 'pipe' the output of one of these filters into IM.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/