We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent17a1eca commit743ebd3Copy full SHA for 743ebd3
nibabel/loadsave.py
@@ -78,7 +78,7 @@ def guessed_image_type(filename):
78
raiseImageFileError(f'Cannot work out file type of "{filename}"')
79
80
81
-defsave(img,filename):
+defsave(img,filename,**kwargs):
82
""" Save an image to file adapting format to `filename`
83
84
Parameters
@@ -96,7 +96,7 @@ def save(img, filename):
96
97
# Save the type as expected
98
try:
99
-img.to_filename(filename)
+img.to_filename(filename,**kwargs)
100
exceptImageFileError:
101
pass
102
else:
@@ -144,7 +144,7 @@ def save(img, filename):
144
# Here, we either have a klass or a converted image.
145
ifconvertedisNone:
146
converted=klass.from_image(img)
147
-converted.to_filename(filename)
+converted.to_filename(filename,**kwargs)
148
149
150
@deprecate_with_version('read_img_data deprecated. '