O
omar
Hi,
I'm trying to read a PPM file into an array so that I can modify it
within a program. A normal PPM file, for those of you who are
unfamilliar, should look like this:
0 0 0 0 0 0 0 0 0 15 0 15
0 0 0 0 15 7 0 0 0 0 0 0
0 0 0 0 0 0 0 15 7 0 0 0
15 0 15 0 0 0 0 0 0 0 0 0
Where each of the integers represent an R,G, or B value. For some
reason, though, whenever I view a PPM file created by djpeg (the jpeg
image decompression tool), it gives something like this:
A4JB5JB5LC4LC4MA1MA1MA1NB2OC3QD4P>0U?
Why are the two files different, and how can I convert the
djpeg-produced ppm file to a nice, neat array?
Thank You,
Omar
I'm trying to read a PPM file into an array so that I can modify it
within a program. A normal PPM file, for those of you who are
unfamilliar, should look like this:
0 0 0 0 0 0 0 0 0 15 0 15
0 0 0 0 15 7 0 0 0 0 0 0
0 0 0 0 0 0 0 15 7 0 0 0
15 0 15 0 0 0 0 0 0 0 0 0
Where each of the integers represent an R,G, or B value. For some
reason, though, whenever I view a PPM file created by djpeg (the jpeg
image decompression tool), it gives something like this:
A4JB5JB5LC4LC4MA1MA1MA1NB2OC3QD4P>0U?
Why are the two files different, and how can I convert the
djpeg-produced ppm file to a nice, neat array?
Thank You,
Omar