Hello all,
i am currently working in a small scale project for my a client. He is only having a shared server which supports GD only. In this site i want to make a gif images from a set of jpg or png images. Is thier any way to create that. I know how to make display gif images and even i know how to do what i want usng imagemagik. but unfortunatly my clients server doesnt support imagemajik (more over im nt tht much confident in imagemajik as i had only worked with it twice).
Any ref or advice will be greatly appriciated.
thankyou.
Create gif images using GDIs it possible to create gif images using GD
Page 1 of 1
1 Replies - 8871 Views - Last Post: 06 June 2008 - 02:45 AM
Replies To: Create gif images using GD
#2
Re: Create gif images using GD
Posted 06 June 2008 - 02:45 AM
hello all,
after much research i found the class attached with this post using which i can create gif images. bt the problem i was facing was tht i want to convert jpg images into gif nd gif to animated gif.
Then i made some minor work and now its working fine.
here is hw i did it
here wht i did is, first i convert the jpg images into gif, thn make the gif and thn delete the gif.
im posting this solutions hoping others with similar problem can solve it easily.
thankyou.
after much research i found the class attached with this post using which i can create gif images. bt the problem i was facing was tht i want to convert jpg images into gif nd gif to animated gif.
Then i made some minor work and now its working fine.
here is hw i did it
<?php
include "GIFEncoder.class.php";
for($i=1;$i<6;$i++){
$imgname = "images/".$i.".jpg";
$im = @imagecreatefromjpeg($imgname); /* Attempt to open */
imagegif($im, "images/".$i.".gif");
$frames[] = "images/".$i.".gif";
$time[] = 200;
}
$gif = new GIFEncoder (
$frames, // frames array
$time, // elapsed time array
0, // loops (0 = infinite)
2, // disposal
0, 0, 0, // rgb of transparency
"url" // source type
);
// display the image
Header ( 'Content-type:image/gif' );
echo $gif->GetAnimation ( );
for($i=1;$i<6;$i++){
@unlink("images/".$i.".gif");
}
?>
here wht i did is, first i convert the jpg images into gif, thn make the gif and thn delete the gif.
im posting this solutions hoping others with similar problem can solve it easily.
thankyou.
Attached File(s)
-
GIFEncoder.class.php (6.75K)
Number of downloads: 606
This post has been edited by silverblaze: 06 June 2008 - 02:46 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote


|