I know that this type of question has been asked before, and so this may get taken down, if so that’s fair, but I need help understanding how these ppm files work so let me know your thoughts. From what I understand so far, a portable pixmap file can either be written in ASCII format or binary, let’s stick with ASCII for now, which we denote as P3 in the text editor header, then you type your image width, height, and max number of different colors. So far this makes sense to me, but obviously if I try to make my own it will be a bunch of random colors, how can I actually open, and properly read and edit the ASCII information of a PPM file I saved from somewhere? The first thing I’m struggling with is reading it, because if I try to open it as a txt file I either get gibberish or an empty file, and even if I did get the information I, wouldn’t understand exactly how to read it if that makes sense, meaning, let’s say I wanted to edit the top right corner of the image, how would I know which colomns and rows of text correspond to which part of the image. The other thing I’m not quite understanding is how can I go in, crop a certain piece of the picture, and replace it with another pictures information (No, I’m not trying to get anyone to do my homework lol), I mean like, lets say I had two pictures and I wanted one on top of the other, how can I figure out which pieces of data to remove in order to replace them with the other pictures data? Sorry if this post doesn’t make alot of sense, might get taken down but I thought I’d try and see if anybody had any experience with this kind of thing. Thank you.
1