# Rendering PNG data in perspective

**URL:** <https://forum.inductiveautomation.com/t/rendering-png-data-in-perspective/85096>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 1, 2024, 3:33pm UTC](https://forum.inductiveautomation.com/t/rendering-png-data-in-perspective/85096 "2024-02-01T15:33:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jakned](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jakned](https://forum.inductiveautomation.com/u/jakned)\
**Post date:** [February 5, 2024, 7:15am UTC](https://forum.inductiveautomation.com/t/rendering-png-data-in-perspective/85096/4 "2024-02-05T07:15:33Z")

</div>

I found a thread where there is a another base64 function used for converting the data:  
[Signature component image to Report - Ignition Early Access - Inductive Automation Forum](https://forum.inductiveautomation.com/t/signature-component-image-to-report/35109)

I used Base64.encodeBytes() method. Now the result looks like a base64 string but it still wont render in Image component.

I was suspecting that the data the POST request returned were modified by Ignition so I tried to save the PNG data to a .png file. It seems the data are not correct and I cannot display the image file in Windows.

The code I used to get the png for saving is below:

```auto
URL = "http://api.labelary.com/v1/printers/12dpmm/labels/5.82677x8.26772/0/"

contentType = "application/x-www-form-urlencoded"
headers = {
  'Accept': 'image/png',
  'Content-Type': 'application/x-www-form-urlencoded'
}

res = system.net.httpPost(URL, 
			contentType = contentType, 
			postData = ZPL, 
			headerValues = headers, 
			throwOnError = False
		)
		
filename = system.file.saveFile("image.png")
if filename is not None:
   system.file.writeFile(filename, str(res))

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/rendering-png-data-in-perspective/85096)._
