Why some readonly dmg images are changing when mounted and what is changed in them? I mean readonly image, not readonly or locked dmg file.
Generally most .dmg files are compressed or otherwise read-only - Mac OS X should not allow any changes to these. Certain types of .dmg images however are mounted read-write (sparseimage comes to mind). If you have write permission to the image, Finder has a really bad habit of populating every folder with metadata (.DS_Store, etc. - very irritating to find 50mb of these files on a flash drive). Viewing, or perhaps simply mounting will trigger Finder to begin indexing and creating these files, leading to a modified image even if you have not added any files yourself.