You are here: Re: [PHP] Image copying « PHP « IT news, forums, messages
Re: [PHP] Image copying

Posted by Jason Wong on 01/06/05 10:46

On Thursday 06 January 2005 14:24, Liam Gibbs wrote:

> What I'm trying to do is copy one JPEG to another JPEG (as mentioned) on
> the fly. I don't want to have a new file produced, just a modified JPEG (a
> few circles here and there) held in a resource. Here's how I call my
> function and how I display the image via HTML:
>
> print("<IMG ALT... HEIGHT... WIDTH... SRC = \"" . copy_pic($sourcepic) .
> "\">");
>
> So I'm calling the function straight from the SRC attribute of the IMG tag.

SRC is supposed to be a URL ...

> Here's what's in my function:
>
> function copy_pic($sourcepic) {
> if(file_exists($sourcepic)) {
> $destinationpic = imagecreatetruecolor(imagesx($sourcepic),
> imagesy($sourcepic)); imagecopy($destinationpic, $sourcepic, 0, 0, 0, 0,
> imagesx($sourcepic), imagesy($sourcepic)); }
>
> return $destinationpic;
> }

.... but you're giving it an image resource!

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация