RE: [PHP] question about GD and colors
Hi I have the same Problem with the bundeled libary. I hade no time to fill in a bug report at bugs.php.net. Probably you could? regards Sebastian > -Original Message- > From: Jean-François Marseaut [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 27, 2003 5:16 PM > To: [EMAIL PROTECTED] > Subject: [PHP] question about GD and colors > > > With this script under, I get resized image in only 16 > colors. with an old version of gd, I got 16 million colors > images. Has someone a response ? > > > /*** > file [string] -> filename jpg > w [int] -> width > / > > header("Content-type: image/png"); > > $file = urldecode($file); > $file = "../".$file; > > $infofile = getimagesize($file); > $long = $infofile[1]; > $haut = $infofile[0]; > $type = $infofile[2]; > > if ($long<$w) $w=$long; > > > $ratio = $haut / $w; > $h = $long / $ratio; > > if ($h>$w) > { > $h = $w; > $ratio = $long / $w; > $w = $haut / $ratio; > } > > > $h = (int)$h; > > $dst_img = ImageCreate($w, $h); > $background_color = ImageColorAllocate ($dst_img, 0, 0, 0); > > switch ($type) > { > case 1 : > $src_img=ImageCreateFromGif($file); > break; > case 2 : > $src_img=ImageCreateFromJpeg($file); > break; > case 3 : > $src_img=ImageCreateFromPng($file); > break; > case 6 : > $src_img=imagecreatefromwbmp($file); > break; > default : > ImagePng($dst_img); > > } > > imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $w, $h, > ImageSX($src_img), ImageSY($src_img)); > imagepng($dst_img); > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: *Umlauts/UTF-8
Hi Alexey I can't tell about Cyrillic, but for "Umlauts" : When you write the Text-Files, you can try to encode them an entities. I stole the following function somewhere : function encodemymail($txt) { for ($i = 0; $i < strlen($txt); $i++) { $ent .= "" . ord(substr($txt, $i, 1)) . ";"; } return($ent); } echo encodemymail('ä ü ö [ ]'); i use it for a different purpose, but it may help.. Grüße Sebastian > -Original Message- > From: Alexey Lysenkov [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 03, 2003 12:43 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: *Umlauts/UTF-8 > > > Please, anybody? I'm really stuck with this. Please, help, if > you know > the solution. > > -Alex > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dir Help PLEASE
-- If it can be dreamt, it can be build "Chris" <[EMAIL PROTECTED]> wrote in message 001f01c07c3b$fc965840$8a1412d1@chris">news:001f01c07c3b$fc965840$8a1412d1@chris... 2 things, first how do I give something the filepath of a folder that proceeded it? Also, how can I set up subdomains like sub.domain.com? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mysql php4.04 and safe_mode
create a dir called tmp in de dir where de script runs chmod 777 that dir and the run the script again .. -- If it can be dreamt, it can be build "andreas (@work)" <[EMAIL PROTECTED]> wrote in message 003501c07ce5$41a15120$fe78a8c0@devel01">news:003501c07ce5$41a15120$fe78a8c0@devel01... hi list, sorry, but we cant manage a Load Data Infile cause we always get: Can't get stat of '/tmp/phpNNAQSM' (Errcode: 2) OUR Code is working fine in different project where safe_mode = OFF = heres the line where we try to move the file to a webfolder in our directory move_uploaded_file ($textfile, "/home/sites/site2/web/Tango/tmp/mySql.txt"); chmod("/home/sites/site2/web/Hafele/tmp/mySql.txt", 0644); = any ideas for us ? is there a way that we can set the upload_tmp_dir path in a .htaccess file ? thank you andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] need urgent session help, since new php version broke my code
Hi all all the links in my page link to not existing html pages. i redirect the 404 to a php script. when users had disabeled cookies, i parsed the request_uri for phpsessid and then set $HTTP_GET_VARS['PHPSESSID']=the parsed one. when i after that called session_start(), php was using the id from $HTTP_GET_VARS['PHPSESSID']. after upgrade to the latest php version this does not work anymore. i get a new PHPSESSID on every request. is there any way to keep the sessionid with these redirects? *extremecryforhelpsincepageisbrokenfornoncookieusers* Sebastian
[PHP] what constants are in php like __FILE__
Hi all I'm just curious what other constants in php are defined. I found out about __FILE__ today which is great, if you use a lot of include & require... any hints where or how to find a list? Sebastian
[PHP] what to do when i want to stop ob_gzhandler()
HI all if i automatically start ob_start('ob_gzhandler') but need to disable it afterwards, because i'm sending to a java applet that crashes when receiving gz content. how do i do it? if i call ob_end_clean apache goes amok and dows strange things ( allocating lots of memory and stop working for a few seconds ) is there another way to return to normal output? Sebastian
RE: [PHP] graphing packages
hi you could try http://www.aditus.nu/jpgraph/ which looks awesome, but i'm not sure about the license, so please check it... Sebastian > -Original Message- > From: Christian Calloway [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 15, 2002 1:15 AM > To: [EMAIL PROTECTED] > Subject: [PHP] graphing packages > > > hey ppl, > > I need to create some fairly complex graphs dynamically, and > I need to be able to specify line, bar, or pie charts. Are > there any PHP packages that someone could point me to that > would fill my needs. Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php