c語言load函數(shù) c語言調用圖片函數(shù)?
c語言調用圖片函數(shù)?C語言調用圖片數(shù)據(jù)。據(jù)我所知,MATLAB有imshow(),C似乎沒有。C只能將圖片讀入內存,經(jīng)過相關處理后以一定格式保存到硬盤上,然后打開圖片*Fname)//圖片的寬度和高度
c語言調用圖片函數(shù)?
C語言調用圖片數(shù)據(jù)。據(jù)我所知,MATLAB有imshow(),C似乎沒有。C只能將圖片讀入內存,經(jīng)過相關處理后以一定格式保存到硬盤上,然后打開圖片*Fname)//圖片的寬度和高度,圖片的位置(包括后綴){unsigned char*image=new unsigned char[width*height]file*FP FP=fopen(Fname,“RB”)free(image,1,width*height,F(xiàn)P)Fclose(FP)return image}/////////////////void writerawdata(unsigned char*image,int width,int height,char*fname){file*FP=fopen(fname,“wb”)fwrite(image,1,width*height,F(xiàn)P)Fclose(FP)}