Write a library of static methods RawPicture with read() and write() methods for saving and reading pictures

Question:

Write a library of static methods RawPicture with read() and write() methods for saving and reading pictures from a file. The write() method takes a Picture and the name of a file as arguments and writes the picture to the specified file, using the following format: if the picture is w-byh, write w, then h, then w × h triples of integers representing the pixel color values, in row-major order. The read() method takes the name of a picture file as an argument and returns a Picture, which it creates by reading a picture from the specified file, in the format just described. Note: Be aware that this will use up much more disk space than necessary—the standard formats compress this information so that it will not take up so much space.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: