jimp-dev/jimp

Error: marker was not found

Open

#935 geöffnet am 30. Aug. 2020

Auf GitHub ansehen
 (5 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)JavaScript (785 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (13.218 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Expected Behavior

Image processing successfully

Current Behavior

Error: marker was not found

Failure Information (for bugs)

bug

Steps to Reproduce

try {
    let img = await jimp.read(imagePath)
    await img.cover(300, 300)
    await img.quality(80)
    await img.rgba(false)
    await img.background(0xffffffff)

    await img.writeAsync(savePath + imgName)

    console.log('success')
  } catch (e) {
    console.log(e)
  }

Context

its not happening all the time. sometime the error occur, sometime not with the same image.

  • Jimp Version: 0.16.1
  • Operating System: ubuntu 20.04
  • Node version: 12.18.3

Failure Logs

Error: marker was not found at decodeScan (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/jpeg-js/lib/decoder.js:344:15) at constructor.parse (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/jpeg-js/lib/decoder.js:804:29) at Object.decode [as image/jpeg] (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/jpeg-js/lib/decoder.js:1096:11) at Jimp.call (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/@jimp/core/src/utils/image-bitmap.js:165:21) at Jimp.parseBitmap (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/@jimp/core/src/index.js:400:17) at /mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/@jimp/core/src/index.js:344:14 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) { methodName: 'constructor' }

Contributor Guide