Closed sunwoo76 closed 1 month ago
Hello @sunwoo76,
libvips caches many operations to improve speed. You can force a loader to go back to the source and reload the image with:
image = pyvips.Image.new_from_file(svg_path, revalidate=True)
Hello @sunwoo76,
libvips caches many operations to improve speed. You can force a loader to go back to the source and reload the image with:
image = pyvips.Image.new_from_file(svg_path, revalidate=True)
Thank you for replying :)
However, the new error has occured:
File "./get_render_310.py", line 380, in <module>
image = pyvips.Image.new_from_file(svg_path, revalidate=True)
File "/home/psc/anaconda3/lib/python3.8/site-packages/pyvips/vimage.py", line 352, in new_from_file
return pyvips.Operation.call(name, filename,
File "/home/psc/anaconda3/lib/python3.8/site-packages/pyvips/voperation.py", line 290, in call
raise Error('{0} does not support optional argument {1}'
pyvips.error.Error: VipsForeignLoadMagickFile does not support optional argument revalidate
I checked the supported argumnet of "VipsForeignLoadMagickFile". The results as below: input: ['all_frames', 'density', 'disc', 'access', 'sequential'] output: ['flags']
It seems that the optional argument is not supported.
ps. My current pyvips version is 2.2.3.
revalidate
was added in libvips 8.15, perhaps you are using an older version?
In this case, the svg contents are changed in the middle of the code. After changing the content and re-write to the same svg_path and read again with the same svg_path.
However, the first-saving result and second-saving result are the same.
How can I treat this?
Thank you.