|
saving modified image to blob: msg#01144db.mysql.general
Hi there, I would like to save a jpg into a blob field of mysql. The function underneath works fine if I read the image from the temporary destination where php did put it after uploading. My problem is, that I would like to do some funky stuff to the image like changing colors or adding watermarks. So I have several functions ahead before I used to store them successfully to the file system. Now I would like to store it to a blob field, but this does not work. Like I said it works to store the temp file, but not the other one. I guess it has to do with something regarding the imagejpeg function. Here is what I tryed: ######################################### # save image to db into blob // this does not work (outputImg is a the colorcorrected file) $data = addslashes($outputImg); // this one would work # $data = addslashes(fread(fopen($picture_location, "r"), filesize($picture_location))); $stmt =" INSERT INTO test.picture_test (file_name, file_type, picture) VALUES ('$name', '$picture_location_type', '$data') "; execute_stmt($stmt, $link); ######################################### Maybe some of you guy has a good idea on that. Thanx for any help, Andy query --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <mysql-thread113394@xxxxxxxxxxxxxxx> To unsubscribe, e-mail <mysql-unsubscribe-##L=##H@xxxxxxxxxxxxxxx> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | problems in './congigure' C++ API lirary for MySQL: 01144, Joonas Aalto |
|---|---|
| Next by Date: | error : make test: 01144, Richard Pijnenburg |
| Previous by Thread: | problems in './congigure' C++ API lirary for MySQLi: 01144, Joonas Aalto |
| Next by Thread: | Re: saving modified image to blob: 01144, Georg Richter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |