CaramelFur / Picsur

An easy to use, selfhostable image sharing service like Imgur with built in converting
https://picsur.org/
GNU Affero General Public License v3.0
774 stars 41 forks source link

Error: input image size does not match expected image size #55

Closed mcfrojd closed 8 months ago

mcfrojd commented 10 months ago

When i try to upload a .bmp file to use in an email signature i get this error.

[Nest] 46  - 09/28/2023, 9:27:44 AM    WARN [SharpWrapper47161] Worker error: /picsur/node_modules/bmp-img/dist/index.js:15
    return addon.decode(data);
                 ^
Error: input image size does not match expected image size
    at BMPdecode (/picsur/node_modules/bmp-img/dist/index.js:15:18)
    at bmpSharpIn (file:///picsur/backend/dist/workers/sharp/universal-sharp.js:17:20)
    at UniversalSharpIn (file:///picsur/backend/dist/workers/sharp/universal-sharp.js:7:16)
    at SharpWorker.init (file:///picsur/backend/dist/workers/sharp/sharp.worker.js:45:23)
    at SharpWorker.messageHandler (file:///picsur/backend/dist/workers/sharp/sharp.worker.js:28:18)
    at process.emit (node:events:511:28)
    at emit (node:internal/child_process:944:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
Node.js v20.3.0
[Nest] 46  - 09/28/2023, 9:27:44 AM   ERROR [MainExceptionFilter] (194.16.219.188 -> POST /api/image/upload) InternalFailure: Worker closed

Any ide why this is?

Maybe it is my image that is the problem, when i tried another bmp file it works

CaramelFur commented 8 months ago

Yep, that is most certainly your image causing the issue. If you could send it to me, I can take a look what the problem is.

mcfrojd commented 8 months ago

Not sure what the problem was, but i made a new image and uploaded it.