Re: Images again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/14/07, Børge Holen <borge@xxxxxxxxxxx> 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.net

For 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux