Re: Images again
| From: | Tijnema ! | Date: | Sat, 14 Apr 2007 07:45:09 +0000 |
| Subject: | Re: Images again | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-252925@lists.php.net to get a copy of this message | ||
On 4/14/07, Børge Holen <borge@arivene.net> wrote:
Before mr lynch starts beating up those already dead and probably long since burried horses... Images in a database! See I was just wondering, and that at times leads to late nights I used to read the images from two different files; one watermarked the image and one let it throught without any hazzle. Of course this kind of script was easy enought to get around the watermarking, witch I fixed with the http referer witch as follows IE don't send. I don't particulary like ppl who use IE (ups did I upset someone?) ;D.Hmm, nearly.... I use IE, NOT because i like it, but because i hate the others more (On windows platform).
However I started compressing my scripts and putting them inside one file. And the status is so far: * Query for the image object. * Query for copyright check in case of watermarking. If no watermarking skip to echo * Read the object. * put object in a file outside webroot like /tmp. * read both the watermark and object * merge * echo Is it possible to skip one query and still be able to read ownership from a table and at the same time stream the object, witch lead me to the next question, I can't seem to be able to make imageCreateFromJPEG handle the direct stream, nor that I fetch it in an array, is any of this possible?You should fetch the stream manually in a string, and then use imagecreatefromstring, http://www.php.net/imagecreatefromstring
As of now I need two files to make this happen. Either I use one file to check for rights and download throught a second file (close to the old solution) or I try this new thing and end up with one php file witch needs the object stream to be saved before it can be managed proberly. -- --- Børge http://www.arivene.netFor the rest of your message, i don't understand what you're trying to do. Show us (parts of) the code you have now, and then explain what you've wanted to do, and what it does now. Tijnema