C언어로 ppm이미지 만들기
김예쁨
2023.04.01
c 프로그렘으로 이 이미지를 만들어야 하는 데요.
아직 함수까지 밖에 안배웠어요. 반복문(for)과 조건문 이용해서 만들어야될꺼같아요.
함수는
1.void make_header(int w,int h)
{
printf(P6\n);
printf(%d %d %d\n,w,h,255)
}
2.print_Row (int yValue,int width, int height)
3.make_pixel (unsigned char r, unsigned char g, unsigned char b)
{
printf(%c%c%c,r,g,b)
}
이 세가지를 사용해야되는데요. 2번째함수는 어떻게 만드는 지 모르겠네요ㅠㅠ 기울기를 이용하는 것같은데..
어떻게 코드를 짜야될까요?