This is an improved and extended version of the paper presented in CVIP 2020 conference. Stream ciphers are extensively used over a wide range of applications including security of digital data. In this paper, a method for securing different types of images (binary, gray scale, true color, and index) based on stream cipher (RC4A) and MDS (Maximum Distance Separable) matrix is proposed. The method adopts the framework of the Permutation-Substitution Network (PSN) of cryptography, and thus satisfies both confusion and diffusion properties required for a secure encryption algorithm. The proposed method encrypts a digital image into a random-like image from human visual as well as statistical point of view. Several encryption evaluation metrics, such as key sensitivity, chi-squared test, adjacent pixels correlation coefficient, irregular deviation, number of pixel change rate, unified averaged changed intensity, etc., are applied on test images taken from MATLAB IPT and USC-SIPI image database, to empirically assess the performance of the proposed method. The results of these statistical and security tests support the robustness of the proposed approach.