# SaveScreenshot and ViewSize resolution issue

**URL:** https://discourse.paraview.org/t/savescreenshot-and-viewsize-resolution-issue/12526
**Category:** ParaView Support
**Tags:** python
**Created:** [July 17, 2023, 9:51am UTC](https://discourse.paraview.org/t/savescreenshot-and-viewsize-resolution-issue/12526 "2023-07-17T09:51:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![CapLek](https://discourse.paraview.org/user_avatar/discourse.paraview.org/caplek/32/3430_2.png) [@CapLek](https://discourse.paraview.org/u/CapLek)
#### Post date: [July 17, 2023, 9:51am UTC](https://discourse.paraview.org/t/savescreenshot-and-viewsize-resolution-issue/12526/1 "2023-07-17T09:51:23Z")

</div>

I`m having an issue with SaveScreenshot method. It gives me an image with different resolution.

Here is a sample code

```auto
from paraview.simple import *

resolution = [1200, 900]
view = GetActiveViewOrCreate('RenderView')
view.ViewSize = resolution

SaveScreenshot(filePath, view, ImageResolution=resolution, OverrideColorPalette='WhiteBackground')

```

When running this code block it gives me 1200 x 845 screenshot (while my display has 1920 x 1080). If I comment out the _ **view.ViewSize = resolution** _ line it will give the image of requested resolution, but in that case the color legend for selected field will have wrong scaling spanned all over the image.

It’s on Windows 10 platform. Tried it on 5.7, 5.9, 5.10 Paraview versions - getting the same behavior across all versions.

What could be the reason for such behavior? Am I missing some setting?  
How can screenshot with requested resolution be generated correctly?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 20, 2023, 5:54pm UTC](https://discourse.paraview.org/t/savescreenshot-and-viewsize-resolution-issue/12526/2 "2023-07-20T17:54:20Z")

</div>

I wonder if the window decorations are getting computed into this somehow?

Cc: @mwestphal

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 24, 2023, 11:47am UTC](https://discourse.paraview.org/t/savescreenshot-and-viewsize-resolution-issue/12526/3 "2023-07-24T11:47:55Z")

</div>

> [@CapLek](#):
>
> It gives me an image with different resolution.

That would definitely be a bug. Do you have the same issue in ParaView proper ?

---

<div class="post-metadata">

### Author: ![CapLek](https://discourse.paraview.org/user_avatar/discourse.paraview.org/caplek/32/3430_2.png) [@CapLek](https://discourse.paraview.org/u/CapLek)
#### Post date: [July 27, 2023, 9:29am UTC](https://discourse.paraview.org/t/savescreenshot-and-viewsize-resolution-issue/12526/4 "2023-07-27T09:29:38Z")

</div>

Yes, the same works fine from Paraivew UI.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 27, 2023, 11:19am UTC](https://discourse.paraview.org/t/savescreenshot-and-viewsize-resolution-issue/12526/5 "2023-07-27T11:19:32Z")

</div>

Could you open an issue on: [https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues) ?
