mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Added file pointer save to SpiderImagePlugin
This commit is contained in:
parent
2512400d6d
commit
1df63eeb1a
|
@ -267,17 +267,11 @@ def _save(im, fp, filename):
|
|||
raise IOError("Error creating Spider header")
|
||||
|
||||
# write the SPIDER header
|
||||
try:
|
||||
fp = open(filename, 'wb')
|
||||
except:
|
||||
raise IOError("Unable to open %s for writing" % filename)
|
||||
fp.writelines(hdr)
|
||||
|
||||
rawmode = "F;32NF" # 32-bit native floating point
|
||||
ImageFile._save(im, fp, [("raw", (0, 0)+im.size, 0, (rawmode, 0, 1))])
|
||||
|
||||
fp.close()
|
||||
|
||||
|
||||
def _save_spider(im, fp, filename):
|
||||
# get the filename extension and register it with Image
|
||||
|
|
Loading…
Reference in New Issue
Block a user