This thesis presents an algorithm and implementation to embed images into partially encrypted JPEG images by combining the information of both images. These partially encrypted JPEG images have been encrypted using the algorithm presented the paper P3 [1]. The P3 algorithm aims to preserve privacy and control over all the images we upload to the photo-sharing services providers (PSPs) and defines an algorithm and a system to achieve this. Moreover once developed and tested the embedding algorithm, the results of Mean square error (MSE) comparing the host image and output image show a large variance of results. To determine which are the images that combine better and lead to less MSE this thesis proposes a model to estimate the resulting error between the output and the host image. The model is based on a statistical representation of the images and leads to results that have good correlation with the actual MSE. The algorithm and model will allow future works to design images with concrete characteristics to minimize the error and different implementations of the system.