Hi all, I'm working on a fairly convoluted project and one of the things I've to do is serve out an image to a http server that will be running locally from a c++ programme. I've the exact thing that I want working in Java with
Code:
PrintStream ps = new PrintStream(s.getOutputStream());
BufferedImage bufferedImage = VncViewer.bi;
if (bufferedImage != null) {
Graphics g = bufferedImage.getGraphics();
g.dispose();
if (ps != null) {
ImageIO.write(bufferedImage, "jpg", ps);
}
}
ps.write(EOL);
ps.flush();
s.close();
which I'd like to replicate in C++. I'm currently using the http_server from here, http://www.adp-gmbh.ch/win/misc/webserver.html and I've got a PaintStruct being created and currently drawing to a HWND, which also uses a HBITMAP, a HDC and a HPALETTE. I'm using MinGW with GCC 3.4.5.
I'm not really sure how I'm supposed to do this in C++, I'm more a Java head, with less than a years experience in C++, so any help that you could give me would be incredibly useful and hugely appreciative. Thanks.