Closed l0rn0r closed 3 years ago
could you do a console.log(spritesheetFiles, spritesPath)
here: https://github.com/cpietsch/vikus-viewer-script/blob/master/src/textures.js#L64 and post the output please.
Thanks for the hint - it is obviously a data problem on my side and not a vikus-viewer-script error:
[
'/path/to/images/data/tmp/256/008595960b3f9c1916c28cc6eeea523e388cc3f1.png',
'/path/to/images/data/tmp/256/01922ae27cf74c6cf25a29e042551a98aea0e24d.png',
'/path/to/images/data/tmp/256/025ed5e05c6ba748fe068991c35b9504c85db80a.png',
undefined,
'/path/to/images/data/tmp/256/028ba791bce38d2bac4cf5f57a30ef397cf68b4d.png',
'/path/to/images/data/tmp/256/035121d8762bea03f6ac75ba07eaca532ec00a2a.png',
'/path/to/images/data/tmp/256/03cae2da5f3389e16be43320fb01a7a119f7b3f2.png',
'/path/to/images/data/tmp/256/049e118d91a534c402b3aeaaecb1c462f61071f7.png',
undefined,
'/path/to/images/data/tmp/256/05dd8caecc2bd43c95386b79c858ed41b929aacf.png',
'/path/to/images/data/tmp/256/065401610bbda82ebd99574f9644055007d47adf.png',
'/path/to/images/data/tmp/256/066588bbc07a7aeed0cb168a0b403e7948ba9dd8.png',
'/path/to/images/data/tmp/256/06e27c3057670e7726bdf620ca4815ab313796a7.png',
'/path/to/images/data/tmp/256/074659cd583f6696507a295c751710b6ac145114.png',
undefined,
'/path/to/images/data/tmp/256/077090d060bff94313e454d8c8901aea2f0524e3.png',
... 436 more items
] /path/to/images/data/sprites
found 452 files
loading metadata
(node:2194349) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:124:11)
at Object.parse (path.js:1382:5)
at module.exports (/usr/lib/node_modules/vikus-viewer-script/node_modules/sharpsheet/dist/sharpsheet.js:2:862)
at async Object.textures [as run] (/usr/lib/node_modules/vikus-viewer-script/src/textures.js:64:19)
at async main (/usr/lib/node_modules/vikus-viewer-script/bin/textures:38:3)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2194349) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2194349) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Running the vikus-viewer-script I get those errors handling the data in the beginning:
0.44% ./025ed5e05c6ba748fe068991c35b9504c85db80a.jpg
there is a problem with ./0271974d233da814ba6c9072c18b797efd65492e.jpg
[Error: Input file has corrupt header: VipsJpeg: Premature end of JPEG file
VipsJpeg: JPEG datastream contains no image
]
0.66% ./0271974d233da814ba6c9072c18b797efd65492e.jpg
0.88% ./028ba791bce38d2bac4cf5f57a30ef397cf68b4d.jpg
1.11% ./035121d8762bea03f6ac75ba07eaca532ec00a2a.jpg
1.33% ./03cae2da5f3389e16be43320fb01a7a119f7b3f2.jpg
1.55% ./049e118d91a534c402b3aeaaecb1c462f61071f7.jpg
there is a problem with ./05c63cc5e949ae60c456aaec7646e725e6fcd4bd.jpg
[Error: Input file contains unsupported image format]
1.77% ./05c63cc5e949ae60c456aaec7646e725e6fcd4bd.jpg
1.99% ./05dd8caecc2bd43c95386b79c858ed41b929aacf.jpg
2.21% ./065401610bbda82ebd99574f9644055007d47adf.jpg
2.43% ./066588bbc07a7aeed0cb168a0b403e7948ba9dd8.jpg
2.65% ./06e27c3057670e7726bdf620ca4815ab313796a7.jpg
2.88% ./074659cd583f6696507a295c751710b6ac145114.jpg
there is a problem with ./0747bb8e9ba4d8ad212c83a2593c95c853d2958f.jpg
[Error: Input file has corrupt header: VipsJpeg: Premature end of JPEG file
VipsJpeg: JPEG datastream contains no image
]
Opening the corrupted files in desktop mode works, but I guess I somehow have to fix those pictures. :) Thanks for your help!
Btw my setting: Ubuntu 20.04.2 LTS node 14.17.0 npm 7.19.1
obviously a data problem on my side and not a vikus-viewer-script error
depends on the perspective ;) the images are processed with sharp which should handle all image formats. maybe a some wrong file permissions ? or check the metadata of the image to confirm the format.
Hi, I get the 4096 and 1024 folder - this works fine. But when the script tries to create the sprites, I get:
(node:2142735) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:124:11) at Object.parse (path.js:1382:5) at module.exports (/usr/lib/node_modules/vikus-viewer-script/node_modules/sharpsheet/dist/sharpsheet.js:2:862) at async Object.textures [as run] (/usr/lib/node_modules/vikus-viewer-script/src/textures.js:64:19) at async main (/usr/lib/node_modules/vikus-viewer-script/bin/textures:38:3)
Got version 2.0.1 and installed it through npm. Greetings