-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading a video file leaves behind a temporary file on Windows #7389
Comments
Thanks for reporting this and the detailed information. I just pushed a patch to make sure this will be fixed in the next release. |
I can confirm that the issue is fixed on the main branch. As always, thank you very much for the swift response! I really appreciate it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ImageMagick version
7.1.1-33
Operating system
Windows
Operating system, version and so on
Windows 11 23H2
Description
Reading a video file via the C or C API of ImageMagick on Windows will leave behind a copy of the file in the temporary directory.
I've identified that two temporary files are created in
ReadVIDEOImage
:ImageMagick/coders/video.c
Lines 253 to 255 in 05a551a
read_info->unique
is used as the output file path for the delegate.read_info->filename
is used as the input file path for the delegate. Note thatAcquireUniqueSymbolicLink
creates a copy of the file when running on Windows.After building the delegate command line,
read_info->filename
is overwritten with the content ofread_info->unique
:ImageMagick/coders/video.c
Lines 262 to 263 in 05a551a
The two temporary files should in theory be removed in these lines:
ImageMagick/coders/video.c
Lines 272 to 273 in 05a551a
But as
read_info->filename
has already been overwritten, this will not remove the temporary file.Note that
MagickCoreTerminus
will delete this temporary file. This is why the problem is not directly observable with the ImageMagick command line tools.Steps to Reproduce
The following trivial Magick program reproduces the problem:
Images
No response
The text was updated successfully, but these errors were encountered: