List:MySQL++« Previous MessageNext Message »
From:Michael O Date:November 18 2008 10:51pm
Subject:FW: currupted image when sending jpeg using load_jpeg
View as plain text  


*Sorry for the formatting, I am spacing things out but hotmail didn't send it that way. I
made the changes to the load_jpeg files. Now it loads the images into the database! I
even went into MySQL Administrator and viewed the files there. They had no problems and
looked crystal clear. BUT when I use cgi_jpeg to view my files the logo.jpg file doesn't
even load. I did try 2 others that I had which did load but where not like the picture at
all. They were thick horizontal lines of mostly green bars. I assume this is what you were
talking about that I needed the rewrite. About the rewrite. I assume you are still working
on it. It failed when I compiled: The error was missing image.h.I decided to go see if I
could use the same link you game me and the header files had nothing in it but one line
and 2 empty #includes. So I assume you are still working on that too.  I would also just
like to ask. Do you recomend storing images into the database or can I just load them by
name? P.S. The files online have no formatting with them they are all just one line, I
did go in and format it before I compiled.Thank you,Michael O.> Date: Tue, 18 Nov 2008
10:02:16 -0700> From: mysqlpp@stripped> To: plusplus@stripped> Subject:
Re: currupted image when sending jpeg using load_jpeg> > 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> > --
> MySQL++ Mailing List> For list archives: http://lists.mysql.com/plusplus> To
unsubscribe: http://lists.mysql.com/plusplus?unsub=1 

Proud to be a PC? Show the world. Download the “I’m a PC” Messenger
themepack now. Download now.
_________________________________________________________________
Windows Live Hotmail now works up to 70% faster.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
Thread
currupted image when sending jpeg using load_jpegMichael O15 Nov
  • Re: currupted image when sending jpeg using load_jpegWarren Young18 Nov
    • FW: currupted image when sending jpeg using load_jpegMichael O18 Nov
      • Re: currupted image when sending jpeg using load_jpegWarren Young19 Nov
        • FW: currupted image when sending jpeg using load_jpegMichael O19 Nov