简体   繁体   English

如何使用图像图像的高度和宽度控件将多张图像合并为一个图像

[英]How to combine multiple images into a single image with images images height and width controls

Actually, I am designing a saree by selecting a saree body-color, border color, and border design(all are images). 实际上,我是通过选择纱丽的主体颜色,边框颜色和边框设计(全部为图像)来设计纱丽的。 These are multiple images that I am selecting but want to show the designed saree as a single image instead of showing as multiple images. 这些是我正在选择的多张图像,但希望将设计的纱丽显示为单张图像,而不是显示为多张图像。

Already tried that to combine the multiple images as a single image but it couldn't get. 已经尝试过将多个图像合并为一个图像,但无法实现。

Cannot show you the file because already it has a huge code of HTML, javascript for designing a saree. 无法显示该文件,因为该文件已经具有用于设计纱丽的HTML和javascript巨大代码。

Simply want to show the designed saree as a single image instead of multiple images. 只是想将设计的纱丽显示为单个图像而不是多个图像。 Below was the example link: 以下是示例链接:

https://originalstitch.com/design-dress-shirt https://originalstitch.com/design-dress-shirt

In this, the shirts are designing but I want to design a saree. 衬衫在设计中,但我想设计一件纱丽。 Instead of a shirt, the saree should display with colors, border designs. 纱丽代替衬衫,应显示颜色,边框设计。

You could use a library like: https://www.npmjs.com/package/html2canvas 您可以使用类似以下的库: https : //www.npmjs.com/package/html2canvas

This would allow you to turn your html in a canvas 这将允许您在画布中打开html

Then use javascript canvas.toDataURL('png') 然后使用javascript canvas.toDataURL('png')

giving you a base64 string which is a single image 给你一个base64字符串,这是一个单一的图像

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM