readFILEtoBMP (bmp, "c:\\\\Penguins.bmp"); //로 width, height 읽어오고
reduce_half (bmp, bmp);
}
void reduce_half (BMP * in_bmp, BMP* out_bmp)
{
printf("%d\n",in_bmp->bmp_info_header.image_width); // 1024 나옴
out_bmp->bmp_info_header.image_height = 500;
out_bmp->bmp_info_header.image_width = 500;
printf("%d",in_bmp->bmp_info_header.image_width); // 500나옴
getchar();
왜 out_bmp 값을바꿨는데 in_bmp값도 바뀌는거에요?
함수로 넘겨주는 포인터가 같잖아...
http://dblack.tk
커뮤니티 사이트 입니다 많은 이용 부탁 드립니다.