image offsetTop code example
Example: offset calculation for images
offsetFactor = (1.0 - scale) / 2;
dx = originalWidth * offsetFactor;
dy = originalHeight * offsetFactor;
offsetFactor = (1.0 - scale) / 2;
dx = originalWidth * offsetFactor;
dy = originalHeight * offsetFactor;