diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2020-07-21 14:45:14 +0200 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2020-07-21 14:45:14 +0200 |
commit | 328032e2317e3ac4859196bbf12bdb71795302fe (patch) | |
tree | 8cd13462beab109e3cb53410c42335b6d1e00ee6 /silx/gui/plot/backends/glutils/PlotImageFile.py | |
parent | 33ed2a64c92b0311ae35456c016eb284e426afc2 (diff) |
New upstream version 0.13.0+dfsg
Diffstat (limited to 'silx/gui/plot/backends/glutils/PlotImageFile.py')
-rw-r--r-- | silx/gui/plot/backends/glutils/PlotImageFile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/silx/gui/plot/backends/glutils/PlotImageFile.py b/silx/gui/plot/backends/glutils/PlotImageFile.py index 83c7ae0..5fb6853 100644 --- a/silx/gui/plot/backends/glutils/PlotImageFile.py +++ b/silx/gui/plot/backends/glutils/PlotImageFile.py @@ -1,7 +1,7 @@ # coding: utf-8 # /*########################################################################## # -# Copyright (c) 2014-2017 European Synchrotron Radiation Facility +# Copyright (c) 2014-2020 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -59,7 +59,7 @@ def convertRGBDataToPNG(data): 0, 0, interlace) # Add filter 'None' before each scanline - preparedData = b'\x00' + b'\x00'.join(line.tostring() for line in data) + preparedData = b'\x00' + b'\x00'.join(line.tobytes() for line in data) compressedData = zlib.compress(preparedData, 8) IDATdata = struct.pack("cccc", b'I', b'D', b'A', b'T') @@ -134,7 +134,7 @@ def saveImageToFile(data, fileNameOrObj, fileFormat): fileObj.write(b'P6\n') fileObj.write(b'%d %d\n' % (width, height)) fileObj.write(b'255\n') - fileObj.write(data.tostring()) + fileObj.write(data.tobytes()) elif fileFormat == 'png': fileObj.write(convertRGBDataToPNG(data)) |