Working version of content aware resizing