0
任何人告訴我如何使用NodeJs模塊'gm'獲取圖像信息。在這裏我使用下面的代碼重新調整大小。但如果圖像小於重新調整大小比不重新調整大小,那麼我想驗證圖像的寬度和高度,以便達到目的我想獲取圖像信息。NodeJS gm模型用於獲取圖像的信息?
gm(main_url_path)
.resize(size, size)
.write(compress_path, function (err){
if(!err){
callback(compress_path);
}else{
console.log("Not Compressed success !!"+err);
callback(null);
}
});