Comments (5)
v1版本的时候是支持传入图片宽度和高度参数,v2版本没有高度参数了,请问指定图片的高度?
from mcanvas.
v1 版本也是无法设置的。图片的高度会根据原图比例进行自适应计算,可避免图片发生形变。请问是什么样的需求呢?
from mcanvas.
是这样的场景 ,我需要合成一张海报,上面是一张主图,下面会配置相应的文字,
但是主图的大小是不规则的,导致没法确定文字的位置。我的想法是固定一个 区域(指定宽高)将主图放入这个区域中 ,然后将主图填充到这个区域中。
from mcanvas.
这个场景下,你应该提前加载获取下图片的尺寸,然后根据宽度等比计算下放入海报后的高度,就能准确知道文字应该在的位置了。如果固定宽高,可能会导致图片发生形变。
from mcanvas.
好的,谢谢
from mcanvas.
Related Issues (20)
- TypeError: MCanvas is not a constructor HOT 1
- 想知道引用mcanvas.min.js后为什么找不到MCanvas呢? HOT 6
- 您好,我在移动端用了这个插件,拼接了一张图和一段文字测试了一下,结果出来后的图片非常模糊,不知道是什么原因呢? HOT 4
- .text的lineheight 应为 lineHeight
- 请问 mc.background 和 .add 支持 base64 图片吗 HOT 1
- 能设置图片圆角?比如头像想设置全圆的 HOT 2
- 图片上插入文字,文字有些模糊 HOT 1
- emhance project for Node.js support HOT 7
- 请问background和add方法传入的image是否支持base64格式的图片? HOT 1
- 请问是否支持react native,用于开发App? HOT 2
- 生成非png格式图片会有个黑色边框, HOT 6
- 在安卓机上: 例如华为畅享9或一加手机,会有绘制中断的情况发生 HOT 2
- 可以考虑开放textBaseline属性设置吗 HOT 1
- 英文单词自动换行被切割 HOT 3
- 1.3.9版本因为背景图片有阴影,所以生成一圈黑色边框 HOT 4
- 定义报错 HOT 1
- npm安装包 HOT 1
- 请问什么时候发布2.0,期待支持node.js HOT 1
- 字体问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcanvas.