Re: [PHP] Want to save png to file
2004-07-16 kl. 15.12 skrev Jason Wong: If you already have an image resource then calling imagepng() with a filename will create and write the file for you. Thanks! Now my only problem is that it doesn't seem possible to use imagecopyresized() with a transparent png; it doesn't become transparent /.victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Want to save png to file
2004-07-08 kl. 06.25 skrev Wudi: int imagepng ( resource image [, string filename]) Back on track again! What I don't know is how to save the file - do I read the datastream from imagepng and then create a file and write the stream to it? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Want to save png to file
On Friday 16 July 2004 20:41, Victor Spång Arthursson wrote: 2004-07-08 kl. 06.25 skrev Wudi: int imagepng ( resource image [, string filename]) Back on track again! What I don't know is how to save the file - do I read the datastream from imagepng and then create a file and write the stream to it? If you already have an image resource then calling imagepng() with a filename will create and write the file for you. -- 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 -- /* IBM's original motto: Cogito ergo vendo; vendo ergo sum. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Want to save png to file
int imagepng ( resource image [, string filename]) On Tue, 6 Jul 2004 13:48:44 +0200 Victor Sp?g Arthursson [EMAIL PROTECTED] wrote: Hi! Creating a transparent png using GD and PHP is (almost) no problem, but it's impossible to save? No matter what I try, the saved image wont remember that it's transparent. I suspect the reason it works on the fly is because I manually set the header to image/png, but if I try so save the stream to a file, the transparency disappears? Please please please somebody help! Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Comment: English is not my first language. Wudi [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Want to save png to file
Hi! Creating a transparent png using GD and PHP is (almost) no problem, but it's impossible to save No matter what I try, the saved image wont remember that it's transparent. I suspect the reason it works on the fly is because I manually set the header to image/png, but if I try so save the stream to a file, the transparency disappears Please please please somebody help! Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Want to save png to file
On Tuesday 06 July 2004 19:48, Victor Spng Arthursson wrote: Creating a transparent png using GD and PHP is (almost) no problem, but it's impossible to save Here you say it's impossible to save, but then further down you contradict this by saying that you did manage to save it - only the transparency disappears. Please try to describe your problem accurately so that you don't confuse the people who may want to help! No matter what I try, the saved image wont remember that it's transparent. I suspect the reason it works on the fly is because I manually set the header to image/png, but if I try so save the stream to a file, the transparency disappears OK try this: 1) stream the image, then in your browser save the image to file. 2) don't stream the image, instead save it as file on the server, then ftp (or whatever) the file back to your local computer. 3) now compare the two files to see if they are the same. In Windows use the file compare program 'fc', in *nix use 'diff'. Remember to do a binary comparison in both cases. If both files are exactly the same then you've got a crappy browser - it should display an image file in the same manner regardless of what headers came with it. -- 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 -- /* The avoidance of taxes is the only intellectual pursuit that carries any reward. -- John Maynard Keynes */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php