Sharper image without the edge artifacts

Thanks! This one works perfectly :slight_smile:

PS: Updated the code in the initial post.