Michael O wrote:
> My only guess is that the 'load_image' is broken.
Yes, on Windows it is. The fix is simple:
> Index: examples/load_jpeg.cpp
> ===================================================================
> --- examples/load_jpeg.cpp (revision 2412)
> +++ examples/load_jpeg.cpp (working copy)
> @@ -74,7 +74,7 @@
> // We received at least one non-option argument on the
> // command line, so treat it as a file name
> img_name = argv[ag_optind];
> - ifstream img_file(img_name, ios::ate);
> + ifstream img_file(img_name, ios::ate | ios::binary);
> if (img_file) {
> size_t img_size = img_file.tellg();
> if (img_size > 10) {
Thanks for reporting this. The fix will appear in 3.0.7, which is
imminent. It's trivial enough that you can just hand-hack your code to
work around the problem.
There's also some changes coming to cgi_jpeg which *may* impact Windows.
If you find that Query Browser returns the correct data but cgi_jpeg
still isn't working right on Windows, you can grab the current version
out of the svn repository here:
http://svn.gna.org/viewcvs/*checkout*/mysqlpp/trunk/examples/cgi_jpeg.cpp