I have some plots originally in the JPEG as well as in BMP format and I want to have the best possible output after compilation by Tex software. I have used the pdf format after having it converted with adobe photoshop but the quality deteriorated a lot. I haven't tried with the eps format yet but I don't know if it will work. Please suggest if there are better alternatives.
2 Answers
If you have a BMP picture then I would recommend that you export it to the PNG format.
You can use almost every picture software to change the format from BMP to PNG including Microsoft Paint.
The PNG format will have the same quality (both are lossless) as the BMP version but will be smaller in file size.
The JPG format is not lossless and therefore will decrease the quality. Depending on the content of the picture this will be more or less obvious.
A typical photo (humans, animals, nature and so on) will be perfect for a JPEG format. Accuarte draqings with fine details will suffer more (too much) from the quality decrease.
See also my answer here for a comparison between the different picture formats.
A note on the PDF solution that is discussed in the comments
- Converting a BMP file into a PDF file is not the same as converting it into a vector graphic.
- The PDF format can contain different formats including pixel-orientated formats.
- In most cases it makes no difference if you convert it into a PDF or a PNG.
- With PNG you have more control over the format etc. and PNG files are easier to manipulate (cropping, color adjustments, ...).
- 22,451
-
Is there a way of directly using the 'bmp' format without having to go for the conversions ? – biswajit Oct 13 '16 at 13:49
-
1@biswajit As far as I know not. If you use pdflatex (what you most likeley do) then you have to use either PNG, JPG/JPEG or PDF. See also https://en.wikibooks.org/wiki/LaTeX/Importing_Graphics#Compiling_with_pdflatex – Dr. Manuel Kuehner Oct 13 '16 at 14:26
Based on comments above, I will promote my own comment to an answer.
The OP's problem was that his original rasterized image was downsampled when he converted it to PDF. So, it had nothing to do with vector versus raster, or jpg versus png, or importing a PDF into a TeX document. It was a matter of ensuring that the original image was not downsampled by Photoshop in the process of converting it to PDF. This is a check-box setting in Photoshop.
I mention this because many commercial print services do not accept color or grayscale artwork above 300dpi, and will probably insist that vector artwork be flattened to raster. It's not hard to get 300dpi.
scalerelpackage has nothing to do with vector graphics, only with the automatic scaling of images. The point of the link was that the original graphic (the argument of\includegraphics), by being created as a vector PDF file, would retain its resolution with arbitrary scaling. The key is to make sure the program creating your graphics is outputting them in vector form. For example, I usesigmaplot, which is able to output its results in vector form. Thus, those images, when imported into LaTeX, scale with no loss of resolution. – Steven B. Segletes Oct 12 '16 at 14:07photoshopuser to know what its options are. One approach increasingly used by LaTeX users is to employ the LaTeX packagetikzto create their graphics directly within LaTeX. Of course, this entails learning a new programming language oftikz. See here for the possibilities: http://tex.stackexchange.com/questions/158668/nice-scientific-pictures-show-off – Steven B. Segletes Oct 12 '16 at 14:11