1.jpg2ppm.m
1 function status = jpg2ppm(infilename, outfilename) 2 I = imread(infilename, 'jpg'); 3 imwrite(I, outfilename, 'ppm'); 4 status = 0; 5 close; 6 end
2.命令
jpg2ppm('D:\greens.jpg', 'D:\greens.ppm')
1.jpg2ppm.m
1 function status = jpg2ppm(infilename, outfilename) 2 I = imread(infilename, 'jpg'); 3 imwrite(I, outfilename, 'ppm'); 4 status = 0; 5 close; 6 end
2.命令
jpg2ppm('D:\greens.jpg', 'D:\greens.ppm')