How can I convert a lena.bmp image to lena.tif?
30 views (last 30 days)
CS Researcher on 7 May 2016
Read the image in
I = imread(name.bmp);
h = imshow(I);
In you case name is 'lena'. Hope this helps!
Stephen23 on 7 May 2016
The file type is not determined by the file extension (in fact on linux files are not even required to have a file extension). You cannot just change an image file format by changing its file extension. You can use MATLAB:
Or it would likely be much easier to simply use any reputable image viewer/editor, such as MS Paint, or Irfanview.
Image Analyst on 7 May 2016
Use strrep (or fileparts), and imread() and imwrite(). Simply change the filename.
inputFileName = 'C:/whatever folder/lena.bmp'
outputFileName = strrep(inputFileName, '.bmp', '.tif')
theImage = imread(inputFileName);