# Annotation Screenshot

**URL:** <https://discourse.slicer.org/t/annotation-screenshot/18217>\
**Category:** Support\
**Tags:** python\
**Created:** [June 18, 2021, 6:26pm UTC](https://discourse.slicer.org/t/annotation-screenshot/18217 "2021-06-18T18:26:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loc\_Tran](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/loc_tran/32/11116_2.png) [@Loc\_Tran](https://discourse.slicer.org/u/Loc_Tran)\
**Post date:** [June 18, 2021, 6:26pm UTC](https://discourse.slicer.org/t/annotation-screenshot/18217/1 "2021-06-18T18:26:33Z")

</div>

Hello,

I followed the tutorial on [Script repository — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#screen-capture) to write a python program to take a screenshot. However, The resolution of the screenshot is not very good. I notice that on Annotation Screenshot window we can change Scale Factor to obtain a higher resolution image. I was wondering is there any way we can do that programmatically.

Thank you.

---

<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:** [June 18, 2021, 6:34pm UTC](https://discourse.slicer.org/t/annotation-screenshot/18217/2 "2021-06-18T18:34:08Z")

</div>

The ScaleFactor on the Annotation Screenshot wasn’t a very reliable method (some renderings didn’t work correctly). You should have better luck if you make the target widget the size you want the capture to be. Here’s an example:

> <https://github.com/SlicerMorph/SlicerMorph/blob/master/Animator/Animator.py#L912-L921>

---

<div class="post-metadata">

**Author:** ![Loc\_Tran](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/loc_tran/32/11116_2.png) [@Loc\_Tran](https://discourse.slicer.org/u/Loc_Tran)\
**Post date:** [June 18, 2021, 9:41pm UTC](https://discourse.slicer.org/t/annotation-screenshot/18217/3 "2021-06-18T21:41:56Z")

</div>

Thank you for your answer. I will try that.
