Author: wyoung
Date: Tue Nov 18 17:59:34 2008
New Revision: 2414
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2414&view=rev
Log:
Added binary file I/O flag to file load step of load_jpeg to avoid
munging the JPEG data on Windows. (Has always run fine on *ix.)
Modified:
trunk/examples/load_jpeg.cpp
Modified: trunk/examples/load_jpeg.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/load_jpeg.cpp?rev=2414&r1=2413&r2=2414&view=diff
==============================================================================
--- trunk/examples/load_jpeg.cpp (original)
+++ trunk/examples/load_jpeg.cpp Tue Nov 18 17:59:34 2008
@@ -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) {
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits