You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2021. It is now read-only.
The image is not centered perfectly even the plunker if you change the picture resize parameters :
If you use :
startX = (orientedImg.width - toWidth) / 2;
startY = (orientedImg.height - toHeight) / 2;
in the ng2ImgMaxService.resize method the image is then well centered.
The source image file is 2048 x 1386 px, the resulting image file is 1024 x 693, however the actual image area is 19 x 13 tucked into the top left corner of a black image.
I've reduced the images down to 200px wide and included them side by side for comparison, but I'm not sure how to fix this. Are there parameters I'm not passing correctly to the service?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Use this in img-resize-exact seems to do the trick :
startX = (orientedImg.width - toWidth) / 2;
startY = (orientedImg.height - toHeight) / 2;
The text was updated successfully, but these errors were encountered: