From: Hans-Bernhard B. <HBB...@t-...> - 2009-09-16 21:31:11
|
fredfriend wrote: > I'd like to overplot data with gnuplot via "rgbimage". The image that is > inserted is however always shift-rotated. No, it's just shifted, because you make incorrect assumption about the contents of a PNM image file. > The cropped image is then saved as PNM image Strictly speaking, there is no such thing as saving an image as a PNM file. PNM is a family of three formats. You save as either PBM, PGM or PPM. > I looked at the imported image (the PNM) with different programs and there's > no shift apparent in the image itself, so I think it's a gnuplot thing. You used all kinds of program that know about the PNM family of image file formats. But you told gnuplot that the file was a raw binary image without _any_ format. It's not, so you lied to gnuplot. The behaviour you see is the direct result of that lie. The shift you see is the PNM file format header. The way you told gnuplot to read that file, it has to assume this header was part of the image data. It's not, and so all other file positions are off by its size. |