imagepng error Programming Web Development by johndohmen1963 …); }}[/CODE] but i have the folowing errors Warning: imagepng() [function.imagepng]: Unable to open '1/slides' for writing: Permission …login\loggedin\FotoAlbenweinachtfeier\uploadimage.php on line 82 Warning: imagepng() [function.imagepng]: Unable to open '1/thumbs' for writing: Permission… Re: imagepng error Programming Web Development by johndohmen1963 …/$slides/$thename"; $location="$mapbeschrijving/$thumbs/$thenames"; imagepng($image_p1,$location, 9); imagepng($img,$location1, 9); unlink($thename); include "iffileexist… imagepng(): supplied argument is not a valid Image resource Programming Web Development by zsgamer Errors: imagepng(): supplied argument is not a valid Image resource in /home/…;, $color); ImageString ($img_handle, 2, 108, 71, "$money", $color); ImagePng ($img_handle); ImageDestroy ($img_handle); //Close the Database connection just in case… Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by diafol … = 'Majuzza Gaming: Roleplay Character Statistics'; $pathtoimg = 'stats_img.png'; extract($row); } ImagePng ($img_handle); ImageDestroy ($img_handle); //Close the Database connection just in case… Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by diafol … details are never initialized and there is no extract. [CODE]ImagePng ($img_handle); ImageDestroy ($img_handle);[/CODE] I don't understand what these… imagepng delete after creating? Programming Web Development by BigDan531 …=$x+7; $j=$j+1; if($j==13) $j=0; } Imagepng($img_handle, '/bg2.png'); ImageDestroy($img_handle); ?> [/code] above is my… Re: GD imagepng function produce corrupted image file Programming Web Development by R0bb0b maybe you are having the same problem as this guy: [URL="http://us.php.net/manual/en/function.imagepng.php#79150"]http://us.php.net/manual/en/function.imagepng.php#79150[/URL] [QUOTE]So instead of just imagepng($image); //DIDNT WORK--CORUPT IMAGE This worked imagepng($image,NULL,0,NULL);[/QUOTE] Re: GD imagepng function produce corrupted image file Programming Web Development by cwarn23 … unsigned variable within the function. [CODE=php]imagepng($image_e,'aa.png',0);[/CODE] So replace the… above with below [CODE=php]imagepng($image_p,'aa.png',0);[/CODE] Notice the letter …, $new_height, $width, $height); imagesavealpha($image_p, true); // Output imagepng($image_p,'aa.png',0); //this is the line that has… GD imagepng function produce corrupted image file Programming Web Development by msi_333 …, 0, 0, $new_width, $new_height, $width, $height); imagesavealpha($image_p, true); // Output imagepng($image_e,'aa.png',0);[/CODE] the output image is attached… Warning: imagepng(): supplied argument is not a valid Image resource Programming Web Development by sillverstixx …, 0, 0, 0, $tot_width, $tot_height); @ImageDestroy($image); } } } $save = $userdata['user_id']; imagepng($sprite_1, $phpbb_root_path . $chars_path . '/' . $save . '.png'); imagedestroy($sprite_1); [/CODE] i searched… Re: Warning: imagepng(): supplied argument is not a valid Image resource Programming Web Development by sDJh … all I can think of in the moment. TIP: Comment imagepng and remove all the @, so that you get a proper… Can't save image on live server using imagepng Programming Web Development by OsaMasw …;username"; $directory = $filename.".png"; chmod($directory,0755); imagepng($my_img, $directory, 0, NULL); imagedestroy($my_img); if (file_exists($directory)){ echo… Re: imagepng error Programming Web Development by diafol What are the locations you're trying to write to? 1/thumbs ?? Re: imagepng error Programming Web Development by nonshatter I believe the chmod command will only work on a Linux-type OS's whereas you're using XAMPP for Windows. 1. Navigate to this directory $mapbeschrijving/$slides 1/slides or whatever it is (The directory you are attempting to write the file to), 2. Right click on directory -> select properties -> you should be able to edit the permission … Re: imagepng error Programming Web Development by nonshatter Okay, you will need to apply permissions to the top-level directory to which you wish to write a new folder to. E.g. If you're attempting to write to C:\xampp\htdocs\1\slides Then you will need to apply write permissions to the C:\xampp\[B]htdocs[/B] directory Re: imagepng error Programming Web Development by johndohmen1963 oke thank you that works great but now i have another problem. i uploaded all the files The folder what i created is working perfect but when i add another image into the slides folder and thumb folder there is no image only i see on my screen ����JFIF��:CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 9 ��CY=CNC8YNHNd^Yi� and so… Re: imagepng error Programming Web Development by nonshatter Hmm. Looks like it's something to do with the content-type in your page. I think if you send the following header before outputting your image that will do the trick - you need to tell the browser that you are sending image data and not anything else. [CODE]header('Content-Type: Image/JPEG');[/CODE] [URL="http://www.sitepoint.com/forums/php… Re: imagepng error Programming Web Development by johndohmen1963 i Have fixed that by myself i had a misstype. Only the new images are not in the folder thumb and slides and thats what i do not understand Re: imagepng error Programming Web Development by nonshatter Have you checked your apache log file for hints/error messages? The log file should be located at: [CODE]C:\xampp\apache\logs\error.log[/CODE] It usually provides more descriptive error messages and will save endless hours of debugging/smashing your head against the screen. Re: imagepng error Programming Web Development by johndohmen1963 in C:\xampp\apache\logs\error.log ther i have no errors from the last 3 hours But i have fixed it only there was another little problem there was a copy of the image in the main directory But i done this with unlink($thename); Thanks for your help Many greetings John Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by sv3tli0 Where is your $img_handle value ? Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by zsgamer Hi thanks ardav but that code didn't work, you deleted lots of the code it needed. I re-added some of the code to yours but then i got these errors: [code] Warning: imagestring(): supplied argument is not a valid Image resource in [/code] For this code: [code] ImageString ($img_handle, 2, 25, 7, "$serverdesc", $color); [/code] I just … Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by diafol I thought I just took out the comments. ANyway - this is wierd: [CODE]function sql_sanitize( $sCode ) { if ( function_exists( "mysql_real_escape_string" ) ) { // If PHP version > 4.3.0 $sCode = mysql_real_escape_string( $sCode ); // Escape the MySQL string. } else { // If PHP version < 4.3.0… Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by zsgamer Oh, if you read my PM i want it, so if i type in [url]http://website.com/index.php?='USERNAME[/url]', it will get the fields from 'USERNAME', but i want it so you cannot mySQL inject it. Do you understand?? :(. Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by zsgamer Can you help me or tell me what to do? I don't want explinations because i don't UNDERSTAND ANY of it! Please, can you just help me.... Re: imagepng(): supplied argument is not a valid Image resource Programming Web Development by Ezzaral [QUOTE=zsgamer;1636153]Can you help me or tell me what to do? I don't want explinations because i don't UNDERSTAND ANY of it! Please, can you just help me....[/QUOTE] The forums are for [I]helping you[/I] work out [I]your [/I]programming problems. They aren't a "code on demand" service. If you aren't willing to put any effort into it,… Re: imagepng delete after creating? Programming Web Development by Menster Hi there, You could try the following function: imagefill ( resource $image , int $x , int $y , int $color ); Where $x and $y are the top left coordinates where the filling starts, and just fill the image with white. Re: GD imagepng function produce corrupted image file Programming Web Development by msi_333 thank you:) , how to make the quality of the output image maximum ? Re: Can't save image on live server using imagepng Programming Web Development by OsaMasw am sorry for this disturbing but I solve my problem its was silly of me not noticing the extension for file, its was written as PNG not png so linux server is case sensitive for these thing :P have a nice day . Re: png image croping problem Programming Web Development by network18 …image i got "Fatal error: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png: …" error message. at line no 120 shows imagepng($bgim_new,$bgth_file_name,100); this function[/QUOTE] The 3rd …optional parameter to the imagepng() is called the quality and it specifies the compression…