title: Encrypt PNG image contents in PHP
body: <p>I would like to <strong>encrypt the contents of PNG file</strong> (not the header) in PHP. </p>
  
  <p>After encryption (RSA) the size of IDAT chunk (containing informations about pixels) changes. So I thought of manually changing those binary data (length of chunk, whole chunk and checksum). Specific informations such as width, height, color depth would remain the same (unencrypted).</p>
  
  <p><strong>Just wondering if there is a function that creates the whole header for me, and enables to insert binary data as the contents</strong> (counts the checksum so the image is properly displayed) or I have to do it by myself?</p>