@Override
	public byte[] runBinaryMacro(HTTPRequest httpReq, String parm, HTTPResponse httpResp) throws HTTPServerException
	{
		final MIMEType mimeType = MIMEType.All.getMIMEType(getFilename(httpReq,""));
		if(mimeType != null)
			httpResp.setHeader("Content-Type", mimeType.getType());
		final String last=httpReq.getUrlParameter("PLAYER");
		if(last==null) return null; // for binary macros, null is BREAK
		byte[] img=null;
		if(last.length()>0)
		{
			img=(byte[])Resources.getResource("CMPORTRAIT-"+last);
			if(img==null)
			{
				final List<PlayerData> data=CMLib.database().DBReadPlayerData(last,"CMPORTRAIT");
				if((data!=null)&&(data.size()>0))
				{
					final String encoded=data.get(0).xml();
					img=B64Encoder.B64decode(encoded);
					if(img!=null)
						Resources.submitResource("CMPORTRAIT-"+last,img);
				}
			}
		}
		return img;
	}