Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Jakimow
EO Time Series Viewer
Commits
d3f56c6d
Commit
d3f56c6d
authored
Aug 22, 2013
by
Luke Campagnola
Browse files
fixed PySide bug listing image formats
parent
160b1ee4
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyqtgraph/exporters/ImageExporter.py
View file @
d3f56c6d
from
.Exporter
import
Exporter
from
pyqtgraph.parametertree
import
Parameter
from
pyqtgraph.Qt
import
QtGui
,
QtCore
,
QtSvg
from
pyqtgraph.Qt
import
QtGui
,
QtCore
,
QtSvg
,
USE_PYSIDE
import
pyqtgraph
as
pg
import
numpy
as
np
...
...
@@ -42,7 +42,10 @@ class ImageExporter(Exporter):
def
export
(
self
,
fileName
=
None
,
toBytes
=
False
,
copy
=
False
):
if
fileName
is
None
and
not
toBytes
and
not
copy
:
filter
=
[
"*."
+
bytes
(
f
).
decode
(
'UTF-8'
)
for
f
in
QtGui
.
QImageWriter
.
supportedImageFormats
()]
if
USE_PYSIDE
:
filter
=
[
"*."
+
str
(
f
)
for
f
in
QtGui
.
QImageWriter
.
supportedImageFormats
()]
else
:
filter
=
[
"*."
+
bytes
(
f
).
decode
(
'utf-8'
)
for
f
in
QtGui
.
QImageWriter
.
supportedImageFormats
()]
preferred
=
[
'*.png'
,
'*.tif'
,
'*.jpg'
]
for
p
in
preferred
[::
-
1
]:
if
p
in
filter
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment