Current location: Hot Scripts Forums » Programming Languages » PHP » Import images to a new image ?


Import images to a new image ?

Reply
  #1 (permalink)  
Old 12-08-07, 07:40 PM
Mythvn Mythvn is offline
Wannabe Coder
 
Join Date: Jan 2006
Posts: 111
Thanks: 2
Thanked 0 Times in 0 Posts
Import images to a new image ?

I'm having many images and I want to use PHP to import them to a new created image with positions and dimensions. Is it possible to do so ? Thanks.
Reply With Quote
  #2 (permalink)  
Old 12-09-07, 06:40 PM
grafman grafman is offline
Coding Addict
 
Join Date: Dec 2006
Posts: 278
Thanks: 0
Thanked 0 Times in 0 Posts
Go here: http://us2.php.net/gd

And then you can lookup many tutorials on these calls that will help you do what you are trying to do.
__________________
"Things are difficult only while you don't understand them."
Reply With Quote
  #3 (permalink)  
Old 12-09-07, 11:06 PM
Anoop's Avatar
Anoop Anoop is offline
Newbie Coder
 
Join Date: Dec 2007
Location: chennai
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

<?


$im 
ImageCreate(175,125);

$white ImageColorAllocate($im,255,255,255);

$black ImageColorAllocate($im,0,0,0);

ImageString($im,1,10,20,"ABCdef",$black);
ImageString($im,2,10,35,"ABCdef",$black);
ImageString($im,3,10,53,"ABCdef",$black);
ImageString($im,4,10,70,"ABCdef",$black);
ImageString($im,5,10,90,"ABCdef",$black);

ImageStringUp($im,5,150,118,"Vertical Text",$black);

Header('Content-Type: image/png');

ImagePNG($im);
?>

This is an example image problem...just see it ..
__________________

Last edited by mab; 12-09-07 at 11:25 PM. Reason: Post code in code tags please.
Reply With Quote
  #4 (permalink)  
Old 12-09-07, 11:20 PM
Mythvn Mythvn is offline
Wannabe Coder
 
Join Date: Jan 2006
Posts: 111
Thanks: 2
Thanked 0 Times in 0 Posts
PHP Code:

<?

header
("Content-type: image/jpeg");
$im = @imagecreatefromjpeg("test.jpg");
$im1 = @imagecreatefromjpeg("test1.jpg");
if (!
$im
$im  imagecreatetruecolor(15030);
$bgc imagecolorallocate($im255255255);
$tc  imagecolorallocate($im000);
imagefilledrectangle($im0015030$bgc);
imagestring($im155"Error loading $imgname"$tc);
}
imagejpeg($im);
imagedestroy($im);
?>
I have the two "test.jpg" and "test1.jpg" and I want to show both of them in one new image. Can you tell me how to do please ?
Reply With Quote
  #5 (permalink)  
Old 12-12-07, 06:35 AM
Mythvn Mythvn is offline
Wannabe Coder
 
Join Date: Jan 2006
Posts: 111
Thanks: 2
Thanked 0 Times in 0 Posts
anyone, please ...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP captcha script not generating images - shows broken image crmpicco PHP 2 10-05-07 06:38 AM
Creating an Image from Jtable Smurfet Everything Java 5 12-06-06 09:05 PM
[Programmer Needed] Customer Image Uploading Script *** xxkylexx Job Offers & Assistance 5 06-03-06 07:02 PM
Display 10 random images from DIR with HTML Code for Image cyclotron Script Requests 2 05-14-06 08:59 AM
Load image 2 different images on different placen JLT Script Requests 0 01-27-04 10:29 AM


All times are GMT -5. The time now is 07:32 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.