Removing spaces and scaling each image proportionally with javascript

Here is my task Remove spaces and scale each image proportionally

in the image above, I drag and drop each image from the container on the right side to the left container, and I also provide resize, rotation, flip / flop, forward / back, etc. for the image. Each image has a specific height, top and left, and we can drag any image.

After dragging and dropping, I need to publish these elements, now my task is above the sample sample. I dropped 2 images. The red line should remove empty spaces and proportionally enlarge the image.

Finally, I want Output Conclusion

Please help me

Thanks in advance

+4

Source: https://habr.com/ru/post/1680684/


All Articles