Dear all,
in ParaView 6.0.1 running on Windows 11 I have a problem with the Save Screenshot functionality when the saved image is of JPG type. It appears that the image format is not recognized properly as JPG.
How to reproduce?
- ParaView GUI:
-
Setup a render view
-
File → Save Screenshot
-
Set jpg file name, e.g., test.jpg
-
The “Save Screenshot Options” menu will look like this:
-
Note that under “Image Options” the format is set to PNG and png-specific option “Compression Level” is shown
-
- Python Shell
-
Setup a render view
-
View → Python Shell
-
Enter:
SaveScreenshot(filename="test.jpg",Quality=90) -
The following error message is thrown:
>>> SaveScreenshot(filename="test.jpg",Quality=90) Traceback (most recent call last): File "C:\Program Files\ParaView 6.0.1\bin\lib\site-packages\paraview\servermanager.py", line 499, in __setattr__ setter = getattr(self.__class__, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: type object 'SaveScreenshot' has no attribute 'Quality' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files\ParaView 6.0.1\bin\lib\site-packages\paraview\servermanager.py", line 505, in __setattr__ _bc.setattr(self, name, value) File "C:\Program Files\ParaView 6.0.1\bin\lib\site-packages\paraview\_backwardscompatibilityhelper.py", line 602, in setattr raise AttributeError() AttributeError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<console>", line 1, in <module> File "C:\Program Files\ParaView 6.0.1\bin\lib\site-packages\paraview\simple\io.py", line 540, in SaveScreenshot proxy_util.set(options, **params) File "C:\Program Files\ParaView 6.0.1\bin\lib\site-packages\paraview\util\proxy.py", line 29, in set proxy.__setattr__(k, v) File "C:\Program Files\ParaView 6.0.1\bin\lib\site-packages\paraview\servermanager.py", line 512, in __setattr__ raise AttributeError("Attribute %s does not exist. " % name + AttributeError: Attribute Quality does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add_attribute() if you really want to add this attribute. -
Note that
Quality = 90is not accepted as valid parameter as it is only expected if the image format is JPG and latter apparently is not properly identified from the file nametest.jpg.
-
Is this a bug or am I missing something here?
Best regards,
mckel
