Re: [PHP] Convert GIF to JPG with or without GD

2003-08-06 Thread Daniel Ward
The following code works on Win2K, Apache 1.3.27, PHP 4.3.2

$gif = imagecreatefromgif('image.gif');
$w = imagesx($gif);
$h = imagesy($gif);
$jpg = imagecreate($w, $h);
// or $jpg = imagecreatetruecolor($w, $h); but colors are off
imagecopy($pic, $im, 0, 0, 0, 0, $w, $h);
// or imagecopyresampled($jpg, $gif, 0, 0, 0, 0, $w, $h, $w, $h);
imagejpeg($jpg); // also works with imagepng()
imagedestroy($gif);
imagedestroy($jpg);
exit;

don't have 4.3 on my linux box yet so I haven't tested it there

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert GIF to JPG with or without GD

2002-11-08 Thread Krzysztof Dziekiewicz
 The GD library bundled with PHP 4.3 can read gif images (but not write them)

And imagejpeg allows to create the jpeg file.



-- 
Krzysztof Dziekiewicz


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Convert GIF to JPG with or without GD

2002-11-08 Thread BAROILLER Pierre-Emmanuel
Yes...

I've tried Image Magic , it's good for my work :)
Now, I can resize/resample/reformat any kind of picture...

thanks for all! :)


Krzysztof Dziekiewicz [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
  The GD library bundled with PHP 4.3 can read gif images (but not write
them)

 And imagejpeg allows to create the jpeg file.



 --
 Krzysztof Dziekiewicz




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Convert GIF to JPG with or without GD

2002-11-07 Thread Krzysztof Dziekiewicz
 does anyone know a way to convert a gif file to jpg ?
 I've made a photo album and, want to resize pictures to create thumbnails..
 GD allow resizing jpeg files, but not gif files...
 So... how can I create a jpeg file from the gif source ?
 (may be with an external software...) ???

Command 'convert' from packet Image Magic (Linux)

It is problem with GD: Since all GIF support was removed from the GD library in
version 1.6, this function is not available if you are using that version of the
GD library.




-- 
Krzysztof Dziekiewicz


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Convert GIF to JPG with or without GD

2002-11-07 Thread BAROILLER Pierre-Emmanuel
thanks for all! :)

I'll take a look at this product.

P.E. Baroiller

Krzysztof Dziekiewicz [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
  does anyone know a way to convert a gif file to jpg ?
  I've made a photo album and, want to resize pictures to create
thumbnails..
  GD allow resizing jpeg files, but not gif files...
  So... how can I create a jpeg file from the gif source ?
  (may be with an external software...) ???

 Command 'convert' from packet Image Magic (Linux)

 It is problem with GD: Since all GIF support was removed from the GD
library in
 version 1.6, this function is not available if you are using that version
of the
 GD library.




 --
 Krzysztof Dziekiewicz




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Convert GIF to JPG with or without GD

2002-11-07 Thread Rasmus Lerdorf
The GD library bundled with PHP 4.3 can read gif images (but not write
them)

-Rasmus

On Thu, 7 Nov 2002, BAROILLER Pierre-Emmanuel wrote:

 Hi all,

 does anyone know a way to convert a gif file to jpg ?
 I've made a photo album and, want to resize pictures to create thumbnails..
 GD allow resizing jpeg files, but not gif files...
 So... how can I create a jpeg file from the gif source ?
 (may be with an external software...) ???


 Cheers
 P.E. Baroiller



 --
 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