1. 程式人生 > >GraphicsMagick / ImageMagick缺少lib報錯no decode delegate for this image format

GraphicsMagick / ImageMagick缺少lib報錯no decode delegate for this image format

複製程式碼
> fs.readdirSync('./upload/')
[ 'c21142262b6e78eeeed5ddbc173efe0d.jpg',
  '3e90077423737f7986a559a355631046.jpg',
  '8a3aee002f1740d3ec4f1eba3d703b8c.jpg',
  'df5f8c5af3311df01d002bbdcdb89925.jpg',
  '5074358977fdcbca7667571f7246004e.jpg',
  '85baa7049a7b87e9b35369a01aae33b9.jpg',
  '62e9071d0b685f32d423e3d74c3eaab1.jpg',
  
'65bd0cb519c557fd4f519ae5bef1b97d.jpg' ] > var jpg = gm('./upload/' + fs.readdirSync('./upload/')[0]); undefined > jpg.size(function(){console.log(arguments);}); { domain: null, _events: { size: [Function] }, _maxListeners: 10, _options: {}, data: {}, _in: [], _out: [], _outputFormat: null
, _subCommand: 'convert', source: './upload/c21142262b6e78eeeed5ddbc173efe0d.jpg', _sourceFormatters: [ [Function] ], bufferStream: false } > { '0': undefined, '1': { width: 1280, height: 800 } }
複製程式碼