# vtkResizingWindowToImageFilter and alpha/transparent backgrounds

**URL:** <https://discourse.vtk.org/t/vtkresizingwindowtoimagefilter-and-alpha-transparent-backgrounds/16110>\
**Category:** Development\
**Created:** [October 25, 2025, 3:53am UTC](https://discourse.vtk.org/t/vtkresizingwindowtoimagefilter-and-alpha-transparent-backgrounds/16110 "2025-10-25T03:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geoffw](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/898d66/32.png) [@geoffw](https://discourse.vtk.org/u/geoffw)\
**Post date:** [October 25, 2025, 3:53am UTC](https://discourse.vtk.org/t/vtkresizingwindowtoimagefilter-and-alpha-transparent-backgrounds/16110/1 "2025-10-25T03:53:33Z")

</div>

Just wanted to let the community know that vtkResizingWindowToImageFilter does not appear to properly handle the alpha channel. Setting SetInputBufferTypeToRGBA does not add a 4th element to the output. This was annoying for me since I wanted to render an image with a transparent background.

It turns out that under the hood this filter just uses a vtkWindowToImageFilter, so you can just copy the code vtkResizingWindowToImageFilter uses to do the scaling computation and use vtkWindowToImageFilter directly.

---

<div class="post-metadata">

**Author:** ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)\
**Post date:** [October 27, 2025, 8:50am UTC](https://discourse.vtk.org/t/vtkresizingwindowtoimagefilter-and-alpha-transparent-backgrounds/16110/2 "2025-10-27T08:50:28Z")

</div>

Sounds like an easy bugfix in vtkResizingWindowToImageFilter, please open a Merge Request 🙂

---

<div class="post-metadata">

**Author:** ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)\
**Post date:** [October 27, 2025, 12:16pm UTC](https://discourse.vtk.org/t/vtkresizingwindowtoimagefilter-and-alpha-transparent-backgrounds/16110/3 "2025-10-27T12:16:33Z")

</div>

Hello,

You can report that issue here: [https://gitlab.kitware.com/vtk/vtk/-/issues](https://gitlab.kitware.com/vtk/vtk/-/issues)

best,

PC
