문제

Is there a way to resize an image, so it keeps the full content of the image. All the solution I've tried it going from the middle of the picture and out, so the top, right, bottom and left of the picture is cut out.

Is there a solution where I can zoom out the picture - hope it make sense

도움이 되었습니까?

해결책

You need to keep the images aspect ratio when scaling it (changing its size). There is a pretty simple equation for doing this:

newWidth / oldWidth = ratio
oldHeight * ratio = newHeight

or vice versa with the height.

Hope this helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top