Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EO Time Series Viewer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Jakimow
EO Time Series Viewer
Commits
d3f56c6d
Commit
d3f56c6d
authored
11 years ago
by
Luke Campagnola
Browse files
Options
Downloads
Patches
Plain Diff
fixed PySide bug listing image formats
parent
160b1ee4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyqtgraph/exporters/ImageExporter.py
+5
-2
5 additions, 2 deletions
pyqtgraph/exporters/ImageExporter.py
with
5 additions
and
2 deletions
pyqtgraph/exporters/ImageExporter.py
+
5
−
2
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment