Save screenshot in JPG format misbehaves

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 = 90 is 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 name test.jpg.

Is this a bug or am I missing something here?

Best regards,
mckel

I’m unable to reproduce with ParaView 6.0.1 binary release on Linux.

Thanks for checking! Indeed, I am not able to reproduce this on Linux either. But the issue still persists on Windows. I tested with 6.0.0 and 6.0.1. With 5.13.3 it is properly working.

Unable to reproduce with ParaView 6.0.1 using Windows binary release.

Originally, I was referring to the MSI installer release. However, I have now tested the Windows binary release ParaView-6.0.1-MPI-Windows-Python3.12-msvc2017-AMD64.zip on two Windows systems. On the one system the problem further exists, on the other system the problem does not occur.

Unfortunately, still don’t know the cause for this. As it is system-specific probably difficult to find out. Any ideas?

Did you test with the .msi or the .zip ? that is not clear to me.

I did the tests today with the zip download, on both mentioned systems.

Can you check difference in Windows version ?
Can you reset your ParaView settings ?

Wow, resetting ParaView settings solved the issue. Thank you for the hint!

1 Like