how to set dpi of 300 of tiff image in matlab

158 views (last 30 days)
Hi every one; I have a tiff image which i have created in paint. I do not know its dpi value but i want to set its dpi value tp 300 , Please guide me whether matlab can set its dpi value to 300 or not?? I am asking about some kind of code which resolve my problem Thanks in advance
Lauren Hirt
Lauren Hirt on 7 Dec 2017
Most likely for publication purposes. For instance, IEEE has strict standards on image quality therefore color images must have a 300 dpi when saved for submission.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 17 Jun 2015
imwrite(TheImage, 'filename.tif', 'Resolution', 300)
Walter Roberson
Walter Roberson on 18 Jun 2015
An important question here is: how did you generate the images? If your images are photographs generated by a scientific instrument, there may be good reason why they are exactly the the number of pixels they are, and the only thing that needs to be done is set the resolution of 300 like I show above.
If, however, your images are the result of one of the plotting routines, or the result of a screen capture, then you should be generating them at higher resolution. For example if you used print() then you should use the '-r300' option to create them at 300 dpi.
When printed in the book, how large do you want the images to come out? If you want the printed size to come out as 1.62 inches by 2.73 inches then you are fine, just set the Resolution like I show above. But if you want them to come out larger then you need more pixels in the image so that when printed at 300 dpi it comes out the desired size. To increase the number of pixels the best is to start with a source that has more pixels. If you are using a graphics plot then generate it at higher resolution as mentioned above. If you are working with a photo and there just isn't any more information available, then you will need to resize the image, which is something that is likely to introduce artifacts. But if that's what you need to do, have a look at the discussion over There

Sign in to comment.

More Answers (1)

ABHILASH SINGH on 10 Apr 2017
print(gcf, '-dtiff', 'myfigure.tiff');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!