# 16bit RGBA PNG Support

**URL:** https://discourse.orthanc-server.org/t/16bit-rgba-png-support/2982
**Category:** Google Groups archive
**Created:** [July 6, 2022, 4:07am UTC](https://discourse.orthanc-server.org/t/16bit-rgba-png-support/2982 "2022-07-06T04:07:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![James](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@James](https://discourse.orthanc-server.org/u/James)
#### Post date: [July 6, 2022, 4:07am UTC](https://discourse.orthanc-server.org/t/16bit-rgba-png-support/2982/1 "2022-07-06T04:07:39Z")

</div>

Hi Orthanc Team,

Please find attached a patch to allow the create-dicom endpoint to accept 16bit RGBA PNGs. There are 3 files attached:

1. Patch for the main Orthanc repo
2. Patch for the orthanc-tests repo
3. Example PNG file for testing  
I have tested this locally with different images as well as the attached one.

This is stretching my knowledge of C++ so any feedback is welcome.

Cheers,

James

[orthanc-tests-png-rgba16.patch](https://discourse.orthanc-server.org/uploads/short-url/2edtuvPq63F2TjrPm0uRJoHZnfN.patch) (2.16 KB)

[orthanc-png-rgba16.patch](https://discourse.orthanc-server.org/uploads/short-url/juyhw4JNPNqdzJPYgtKpYyNnKWW.patch) (12.8 KB)

![Png16RBGATest.png](https://discourse.orthanc-server.org/uploads/default/original/1X/7ebdce9da8f32db3d2c7797349603f34fc5b9a2a.png)

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [July 6, 2022, 10:38am UTC](https://discourse.orthanc-server.org/t/16bit-rgba-png-support/2982/2 "2022-07-06T10:38:01Z")

</div>

Hi James,

Thanks a lot for that. \>From a first glance that looks pretty good ! And, there even are unit and integration tests so you’re close to perfection 🙂 !

I’ll integrate that ASAP.

Best regards,

Alain.

---

<div class="post-metadata">

### Author: ![Alain\_Mazy1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Alain\_Mazy1](https://discourse.orthanc-server.org/u/Alain_Mazy1)
#### Post date: [July 8, 2022, 1:29pm UTC](https://discourse.orthanc-server.org/t/16bit-rgba-png-support/2982/3 "2022-07-08T13:29:04Z")

</div>

Hi James,

I have reviewed your code and integrated it as is in our repositories:  
[https://hg.orthanc-server.com/orthanc/rev/255b02c68908](https://hg.orthanc-server.com/orthanc/rev/255b02c68908)

[https://hg.orthanc-server.com/orthanc-tests/rev/e904b2282b0e](https://hg.orthanc-server.com/orthanc-tests/rev/e904b2282b0e)

Thanks again for your contribution.

Alain.
