Pregunta

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

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top