Comments (5)
把报错信息贴出来看看?
from node-images.
问题描述和之前一样,如下错误信息。
希望你能帮我解决一下,谢谢~
ERROR: ../src/Image.cc:390 Image uninitialized.
Error: ../src/Image.cc:390 Image uninitialized.
from node-images.
单看这个报错信息,应该是图片格式的问题。我这没有能复现,方便的话可以把你的代码和要处理的图片发我邮箱。另外说明一下运行的环境(操作系统版本、node版本)。我这边看看是什么问题。
邮箱 zhangyuanwei1988#gmail.com
from node-images.
代码如下:
var images = require('images');
var img = images('a.png');
// 等比缩放
img.size(img.width() * 180 / img.height(), 180);
if (img.width() < 300) {
return ;
}
if (img.height() < 180) {
return ;
}
var x = (img.width() - 300) / 2;
var y = (img.height() - 215) / 2;
return images(img, x, y, 300, 180).save('b.png');
需要说明的是:我上传的图片格式为「jpg」,「png」两种格式,部分图片会上传失败,具体错误就如之前所说的,ERROR: ../src/Image.cc:390 Image uninitialized.
(图片未初始化),这个就不太懂了:-)
from node-images.
images.size()方法会报错。
如果给size()传递的宽度或高度的值比原图片宽高值小的话,就会出现如下的错误信息:
ERROR: ../src/Image.cc:390 Image uninitialized.
Error: ../src/Image.cc:390 Image uninitialized.
即貌似不能进行缩小操作,望解决,谢谢~
from node-images.
Related Issues (20)
- Draw image on negative coordinate
- dyld: lazy symbol binding failed: Symbol not found HOT 1
- dyld[25779]: missing symbol called HOT 5
- macos error HOT 1
- M1 MacBook / Apple Silicon support?
- 原图大小超过2m之后就无法压缩了 HOT 7
- node-gyp rebuild error
- 图片大小超过2M闪退 HOT 1
- 运行代码报错MODULE_NOT_FOUND' HOT 1
- 请问mac M1平台如何自己编译darwin-arm64-binding.node? HOT 3
- 怎么给图片设置透明度 HOT 1
- 有图片裁剪吗
- 怎么使用svg
- node: symbol lookup error: /app/node_modules/images/vendor/linux-x64-binding.node: undefined symbol: _ZN2v87Isolate19CheckMemoryPressureEv HOT 10
- Is it supported base64
- Not found /var/vendor/linux-x64-binding.node
- 希望提供更多平台的binding
- Module still working? HOT 2
- node v20.11.0版本不兼容 HOT 1
- issue to connect with this package during build process from git hub action 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 node-images.