繁体   English   中英

在前端使用 Python 枕头 Angular

[英]Using Python Pillow in front-end Angular

我正在尝试从前端 Angular 8 项目中使用 Python Pillow 库调整 function 的大小。

虽然我知道有 OpenCV 和 HTML5 canvas 之类的替代方案,但根据反馈,这些替代方案不适用于我的用例。 That is because the AI model that my front-end will be interacting with uses Pillow to model and there are some fundamental differences in the way Pillow does resize as compared to OpenCV and Canvas.

库调整大小的区别:

Since I have not been able to find a previously built JavaScript port for Pillow, I assume that I would need to do it on my own, I've explored several Python to JavaScript "Translators" like Brython and Transcrypt but I understand they don'不能与外部库(Pillow 需要)很好地配合使用。

因此,我决定在这里试试运气,看看是否有人遇到过类似的情况,并且在我尝试花几个小时将 Pillow 及其各自的库移植到黑暗面之前,是否有解决我的困境的方法。

提前感谢您的帮助!

PyScript 是一种较新的解决方案,它可以为您将库编译为 wasm,但启动速度极慢

暂无
暂无

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

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