# Screen capture:Can an image with a specified resolution be generated. For example, 512 × 512.or Adjust the view to a specified resolution or size

**URL:** <https://discourse.slicer.org/t/screen-capture-can-an-image-with-a-specified-resolution-be-generated-for-example-512-x-512-or-adjust-the-view-to-a-specified-resolution-or-size/39933>\
**Category:** Feature requests\
**Created:** [October 30, 2024, 8:16am UTC](https://discourse.slicer.org/t/screen-capture-can-an-image-with-a-specified-resolution-be-generated-for-example-512-x-512-or-adjust-the-view-to-a-specified-resolution-or-size/39933 "2024-10-30T08:16:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linhuanfeng](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/linhuanfeng/32/70132_2.png) [@linhuanfeng](https://discourse.slicer.org/u/linhuanfeng)\
**Post date:** [October 30, 2024, 8:16am UTC](https://discourse.slicer.org/t/screen-capture-can-an-image-with-a-specified-resolution-be-generated-for-example-512-x-512-or-adjust-the-view-to-a-specified-resolution-or-size/39933/1 "2024-10-30T08:16:13Z")

</div>

screen capture:Can an image with a specified resolution be generated. For example, 512 × 512.or Adjust the view to a specified resolution or size

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 30, 2024, 2:34pm UTC](https://discourse.slicer.org/t/screen-capture-can-an-image-with-a-specified-resolution-be-generated-for-example-512-x-512-or-adjust-the-view-to-a-specified-resolution-or-size/39933/2 "2024-10-30T14:34:34Z")

</div>

If you are doing this in a script you can temporarily unparent the view and specify the resolution you want and then restore the layout afterwards, something like this:

```auto
tdv = slicer.app.layoutManager().threeDWidget(0)
tdv.setParent(None)
tdv.show()
tdv.size = qt.QSize(512,512)
slicer.app.layoutManager().setLayout(slicer.vtkMRMLLayoutNode.SlicerLayoutConventionalView)

```

---

<div class="post-metadata">

**Author:** ![linhuanfeng](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/linhuanfeng/32/70132_2.png) [@linhuanfeng](https://discourse.slicer.org/u/linhuanfeng)\
**Post date:** [October 30, 2024, 3:16pm UTC](https://discourse.slicer.org/t/screen-capture-can-an-image-with-a-specified-resolution-be-generated-for-example-512-x-512-or-adjust-the-view-to-a-specified-resolution-or-size/39933/3 "2024-10-30T15:16:07Z")

</div>

How to operate other views, such as Axial, Sagittal, or Coronal.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 30, 2024, 4:00pm UTC](https://discourse.slicer.org/t/screen-capture-can-an-image-with-a-specified-resolution-be-generated-for-example-512-x-512-or-adjust-the-view-to-a-specified-resolution-or-size/39933/4 "2024-10-30T16:00:49Z")

</div>

You can do the same, just get sliceWidgets by view id from the layoutManager.

Like `slicer.app.layoutManager().sliceWidget('Red')`
