<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I wrote a WPS service in Python that returns a PNG image. The output
was defined as <br>
<br>
<ComplexData><br>
<Default><br>
mimeType = image/png<br>
</Default><br>
</ComplexData><br>
<br>
In python I used cStringIO, to save the PNG to in image and then
passed it to outputs using the command:<br>
outputs['timeseries']['value'] = img_name.getvalue()<br>
<br>
This approach caused the last character of the PNG image string to
not be included in the WPS XML output, as was confirmed by running:<br>
img_name.getvalue().encode("base64").strip()<br>
<br>
This caused a problem when rendering PNG images that ended with two
equal-signs. For now I have added a workaround in my javascript, but
I think this is a bug in Zoo-WPS with regards to parsing the PNG
binary to string.<br>
<br>
Neil<br>
<br>
<br>
<br>
<br>
<div class="moz-signature">-- <br>
<link rel="stylesheet" type="text/css"
href="/css/keywords/webpart.css">
<link rel="stylesheet" type="text/css"
href="/layouts/css/Mailsignature.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquerybase/jquery-ui.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('#sigHtml').dialog({
close: function (event, ui) { window.location = '<a class="moz-txt-link-freetext" href="http://portalen.dtu.dk/layouts/mailsignature.aspx?sc_lang=en&splash=1&splash=1">http://portalen.dtu.dk/layouts/mailsignature.aspx?sc_lang=en&splash=1&splash=1</a>' },
modal: true,
autoOpen: true,
resizable: false,
title: 'Before you edit your email signature...',
width: '720px'
});
});
</script>
<table>
<tbody>
<tr>
<td>
<div>
<p> </p>
<table style="font-family: Arial; font-size: 8pt; color:
Black; border-collapse: collapse" border="0"
cellpadding="0" cellspacing="0" width="400px">
<tbody>
<tr>
<td colspan="2" valign="top" width="400px"> </td>
</tr>
<tr>
<td colspan="2" style="font-weight: bold;
font-size: 8pt; margin-bottom: 0px; font-family:
Arial;" valign="top" width="400px"> Neil Davis </td>
</tr>
<tr>
<td colspan="2" style="color: #9B9B9B; font-size:
8pt; margin-bottom: 0px; font-family: Arial;"
valign="top" width="400px"> Research Assistant </td>
</tr>
<tr>
<td colspan="2" style="font-size: 8pt;
margin-bottom: 0px; font-family: Arial;"
valign="top" width="400px"> DTU Wind Energy </td>
</tr>
<tr>
<td colspan="2" style="font-size: 8pt;
line-height: 0px; border-bottom: solid 1px
#aeaeae; padding-bottom: 0px; padding-top: 0px;
margin-top: 0px;" valign="top" width="400px">
</td>
</tr>
<tr>
<td style="padding-top: 8px;" valign="top"
width="350px">
<p style="font-size: 8pt; margin-bottom: 0px;
font-weight: bold; font-family: Arial; margin:
0px;"> Technical University of Denmark</p>
</td>
<td rowspan="10" style="text-align: right;
font-family: Arial; padding-top: 8px;"
align="right" valign="top" width="50px"> <img
src="cid:part1.02020605.05020808@dtu.dk"
height="53" width="36"> </td>
</tr>
<tr style="font-size: 8pt; font-family: Arial;
margin: 0px;">
<td> Department of Wind Energy </td>
</tr>
<tr>
<td style="font-size: 8pt; font-family: Arial;
margin: 0px;"> Risø Campus
Frederiksborgvej 399, P.O. Box 49 </td>
</tr>
<tr style="font-size: 8pt; font-family: Arial;
margin: 0px;">
<td> Building 101 </td>
</tr>
<tr>
<td style="font-size: 8pt; font-family: Arial;
margin: 0px;"> 4000 Roskilde </td>
</tr>
<tr style="font-size: 8pt; font-family: Arial;
margin: 0px;">
<td> Denmark </td>
</tr>
<tr style="font-size: 8pt; font-family: Arial;
margin: 0px;">
<td> Direct +45 46775067 </td>
</tr>
<tr style="font-size: 8pt; font-family: Arial;
margin: 0px;">
<td> <a href="mailto:neda@dtu.dk">neda@dtu.dk</a>
</td>
</tr>
<tr style="font-size: 8pt; font-family: Arial;
margin: 0px;">
<td> <a href="http://www.vindenergi.dtu.dk"
style="color:blue;">www.vindenergi.dtu.dk</a>
</td>
</tr>
</tbody>
</table>
<p> </p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>