Just for fun without PSTricks.
\documentclass[tikz,12pt,dvipsnames,border=0cm]{standalone}
\usetikzlibrary{patterns}
\def\M{10}% columns
\def\N{10}% rows
\def\scale{1}% scale
\def\filename{example-image-a}% filename
\def\mygrid{%
\draw[help lines,red,step=.1,ForestGreen!50](-\M,-\N) grid (\M,\N);
\draw[help lines,red,step=1](-\M,-\N) grid (\M,\N);
\foreach \x in{-\M,...,\M}{\node[anchor=south] at (\x,\N){\x};}
\foreach \y in{-\N,...,\N}{\node[anchor=east] at (-\M,\y){\y};}
}
\usepackage{graphicx}
\newsavebox\IBox
\savebox\IBox{\includegraphics[scale=\scale,%trim=18mm 12.5mm 15.7mm 15.8mm, clip
]{\filename}}
\newif\ifgrid
\gridtrue
\gridfalse
\begin{document}
\begin{tikzpicture}[inner sep=0,x=0.5\wd\IBox/\M\relax,y=0.5\ht\IBox/\N\relax]
\draw[fill=red](-11,-11) rectangle (11,11);
\node (image) at (0,0) {\usebox\IBox};
\ifgrid
\mygrid
\fi
\end{tikzpicture}
\end{document}
beamer
? Would you mind to provide complete code and not only short snippets? You'll get better answers.tcbincludegraphics
as is shown in tex.stackexchange.com/a/213405/1952