This somehow started working today but when outputting the PNG, I get strange characters rather than any image. I've adjusted the code to say
Response.ContentType = "image/png"
But no image is actually showing
Hi Janusz Jasinski,
Because the /previewImage end point give us the binary data, to see the image either you should hit the URL in Postman which shows the preview of the binary content or you should convert into base64 string and return to web application so that can be previewed in any HTML with <img> tag.
//Usage in HTML <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAASwAAAE"/>