From 328032e2317e3ac4859196bbf12bdb71795302fe Mon Sep 17 00:00:00 2001 From: Alexandre Marie Date: Tue, 21 Jul 2020 14:45:14 +0200 Subject: New upstream version 0.13.0+dfsg --- silx/gui/plot/backends/glutils/PlotImageFile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'silx/gui/plot/backends/glutils/PlotImageFile.py') 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)) -- cgit v1.2.3