# Save to png file not aware of spacing

**URL:** <https://discourse.slicer.org/t/save-to-png-file-not-aware-of-spacing/6639>\
**Category:** Support\
**Created:** [April 29, 2019, 3:27am UTC](https://discourse.slicer.org/t/save-to-png-file-not-aware-of-spacing/6639 "2019-04-29T03:27:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ButuiHu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/butuihu/32/2386_2.png) [@ButuiHu](https://discourse.slicer.org/u/ButuiHu)\
**Post date:** [April 29, 2019, 3:27am UTC](https://discourse.slicer.org/t/save-to-png-file-not-aware-of-spacing/6639/1 "2019-04-29T03:27:33Z")

</div>

Hi, I’m trying to save a .mhd file to png file to insert in a document. However, 3dslicer seems to be aware of spacing when display .mhd file, but not in saving to .png file.  
In 3dslicer, I got this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/7/676c8c1096c1c6ec2ce570c4f6026168366a90dd.jpeg)  
after saving as png file:  
 ![patient0001_2CH_ED](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/c/7c5deef5ab77f072ab07e4ca198b528dc9befe32.png)

The spacing is wrong, and it also seems that the the saved png file is brighter.

Images from [Camus](http://camus.creatis.insa-lyon.fr/challenge/)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 29, 2019, 2:02pm UTC](https://discourse.slicer.org/t/save-to-png-file-not-aware-of-spacing/6639/2 "2019-04-29T14:02:13Z")

</div>

Consumer file formats, such as png or jpg, are rarely used in medical image computing (there are good reasons for that). Instead, I would recommend to use research formats, such as .nrrd or .mha.

Just for exporting images or videos to a document or presentation, you can use [Screen Capture](https://www.slicer.org/wiki/Documentation/Nightly/Modules/ScreenCapture) module.

---

<div class="post-metadata">

**Author:** ![ButuiHu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/butuihu/32/2386_2.png) [@ButuiHu](https://discourse.slicer.org/u/ButuiHu)\
**Post date:** [April 30, 2019, 2:02am UTC](https://discourse.slicer.org/t/save-to-png-file-not-aware-of-spacing/6639/4 "2019-04-30T02:02:27Z")

</div>

Thank you. I resample the image according to [https://github.com/SimpleITK/SimpleITK/issues/561](https://github.com/SimpleITK/SimpleITK/issues/561).
