pvtpyro Posted August 30, 2006 Share Posted August 30, 2006 I made a script that creates an image. It makes the image just the way I want. comes out perfectly! but the [b]imagedestroy($image);[/b] prevents me from being able to save the image. As of now the file saves as a filename.php.gif, but it's not actually a gif.is there a function or something I can use to save the actual image on my server, then show it in the browser for people to see? Link to comment https://forums.phpfreaks.com/topic/19093-imagecreate/ Share on other sites More sharing options...
Barand Posted August 30, 2006 Share Posted August 30, 2006 [code]<?phpimagecreate ($x, $y); // image codeimagegif($im, $path_filename); // output to fileimagedestroy($im);?>[/code] Link to comment https://forums.phpfreaks.com/topic/19093-imagecreate/#findComment-82644 Share on other sites More sharing options...
onlyican Posted August 30, 2006 Share Posted August 30, 2006 [quote author=Barand link=topic=106183.msg424489#msg424489 date=1156920191][code]<?phpimagecreate ($x, $y); // image codeimagegif($im, $path_filename); // output to fileimagedestroy($im);?>[/code][/quote]using imagecreate can create a poor quality image$image_p = imagecreatetruecolor($new_width, $new_height);thenimagegif($image_p, $save_to, 75) //75 being the quality, i think 75 is a nice onorimagejpegor imagepeng Link to comment https://forums.phpfreaks.com/topic/19093-imagecreate/#findComment-82658 Share on other sites More sharing options...
pvtpyro Posted August 30, 2006 Author Share Posted August 30, 2006 thank you so much! :D Link to comment https://forums.phpfreaks.com/topic/19093-imagecreate/#findComment-82907 Share on other sites More sharing options...
pvtpyro Posted August 30, 2006 Author Share Posted August 30, 2006 once i add imagename.gif after $image, the script stops working. ??? Link to comment https://forums.phpfreaks.com/topic/19093-imagecreate/#findComment-82923 Share on other sites More sharing options...
onlyican Posted August 30, 2006 Share Posted August 30, 2006 When you say create image, do u mean using other images, or adding lines ectif using other images, here is code I use to blend images[code]<?php$myimage = imagecreatefromjpeg("images/bground_img.jpg");imagealphablending($map, 1);$extra_img = imagecreatefromjpeg("second_img.jpg");imagealphablending($extra_img, 1);imagecopy($myimage, $extra_img, $x_loc, $y_loc, 0, 0, $width, $height);imagejpeg($map, $save_to);?>[/code] Link to comment https://forums.phpfreaks.com/topic/19093-imagecreate/#findComment-82992 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.