Posts

Showing posts from February, 2024

今日GPT-4が答えられなかったこと: Node.jsのsharpが画像をつかんだままになる → sharp.cache(false)

https://github.com/lovell/sharp/issues/415 Hello, input files can be kept open by libvips' file cache. You can use  sharp.cache(false)  to prevent this - see  https://sharp.pixelplumbing.com/api-utility#cache どうもWindowsに限った話みたいだが、Node.jsのsharpパッケージを使って画像を加工したあと読み込んだ画像がつかんだままになる(呼び出し側のアプリケーションが終わるまで削除できない)問題、GPT-4は答えられなかった。 こちらにも同様の情報: https://stackoverflow.com/questions/50403225/fluent-ffmpeg-unable-to-remove-video-screenshot-after-creation use this: sharp. cache ( false );