Create a 2D array of size 14x14 having same values ranging from 0 to 255 in each row. You are free to specify the values of this array. For instance, consider a 3x3 array as; Array [3] [3]= {{12,12,12}, {75, 75, 75}, {247, 247, 247}} 12, 75, and 247 pixel values are specified in a way that they are in a range of 0 to 255 and they are same in a row. Write a code namely arraytoimage.c using any pgm (portable gray map) format image that represents an image in a text file in which each pixel is represented by a number ranging from 0 and 255. In this code, write: -P2 (magic number) -Width and height of the image -Maximum grayscale value -Gray scale intensity values you specify in the array in an order to this image
Create a 2D array of size 14x14 having same values ranging from 0 to 255 in each row. You are free to specify the values of this array. For instance, consider a 3x3 array as;
Array [3] [3]= {{12,12,12}, {75, 75, 75}, {247, 247, 247}}
12, 75, and 247 pixel values are specified in a way that they are in a range of 0 to 255 and they are same in a row.
Write a code namely arraytoimage.c using any pgm (portable gray map) format image that represents an image in a text file in which each pixel is represented by a number ranging from 0 and 255. In this code, write:
-P2 (magic number)
-Width and height of the image
-Maximum grayscale value
-Gray scale intensity values you specify in the array
in an order to this image
Step by step
Solved in 2 steps with 2 images