A pinhole collimator was designed and simulated to achieve the desired level of resolution and sensitivity in a gamma camera by utilizing a CdTe semiconductor detector. To conduct this objective, a simulation toolkit based on the Geant4 Application for Tomographic Emission (GATE) was employed. The image capabilities of the proposed system were assessed by varying the magnification factor and pinhole diameter to estimate spatial resolution and sensitivity. Moreover, a hot rod phantom was designed to evaluate the system's overall imaging functionality. Results revealed that an increase in the pinhole diameter was correlated with an increase in sensitivity, while the spatial resolution was decreasing. There were distinct variations in sensitivity and spatial resolution depending on changes in the magnification factor as well. Finally, by analyzing trade-off curves, 1.38 ± 0.081 mm was approximately the optimal pinhole diameter for our proposed system.