# Color Image to Grayscale conversion by using dvips in MikTeX

I found an answer that how to convert the color images into Gray(B/W) scale, refer the below link:

PNG figures in black and white

But if I follow the suggestion, i.e., dvips -I g , then some error "dvips: ! Invalid option -I'. Try --help for more information. " is coming, please suggest what went wrong with my tag and my tags are follows:

\documentclass{book}
\usepackage{color,graphicx}
\begin{document}

\begin{figure}
\centerline{\includegraphics{Color.eps}}
\end{figure}

\end{document}

• You are right, this option does not exist (anymore). Are you fixed to dvips? – TeXnician Apr 19 '17 at 7:27
• Yes, I should meet the requirement by using "dvips" and my general requirement is TeX->DVI->dvips ->ps2pdf or generate PDF through Acrobat Distiller – MadyYuvi Apr 19 '17 at 8:23
• Using TeX on a LaTeX document? How do you do that? Do you use any packages that prevent you from using pdf(la)tex? Because else you would have the option of this answer. I don't know whether this works with dvi. – TeXnician Apr 19 '17 at 8:28
• When you use ps2pdf, try including the options -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray – Nicola Talbot Apr 19 '17 at 10:46

Finally I got the answer to fix my requirement, refer https://groups.google.com/forum/#!msg/comp.text.tex/E2EtYQC-A0Y/RoLCFm_5CAAJ special thanks to Herbert...And the answer given below:

\documentclass{book}
\usepackage{graphicx}
\def\setGray{\special{ps:
true setglobal globaldict begin
/setrgbcolor { 0.07 mul exch 0.71 mul add exch 0.21 mul add setgray
} def
end false setglobal
}}
\AtBeginDocument{\setGray}
\begin{document}
\begin{figure}
\setGray
\centerline{\includegraphics{colorrgbmake2.eps}}
\end{figure}

\clearpage

\begin{figure}
\setGray
\centerline{\includegraphics{colorrgbmake2.eps}}
\end{figure}

\end{document}
`