modification on TIBlog and imageview for detecting and setting scale of picture