gsb <gsb@qwest.ne t> wrote:[color=blue]
> I have only used the GD lib a little.
> Is there a way to convert a file from a .gif to a .jpeg file?[/color]
Note: 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.
On Thu, 6 May 2004 20:49:14 +0100, "Filth" <p.macdonald@bl ueyonder.co.uk>
wrote:
[color=blue][color=green][color=darkred]
>> > I have only used the GD lib a little.
>> > Is there a way to convert a file from a .gif to a .jpeg file?[/color]
>>
>> Use http://us3.php.net/manual/en/function.imagejpeg.php with
>> http://us3.php.net/manual/en/functio...atefromgif.php as the
>> source.[/color]
>
>might not work because of the following
>
>Note: 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.[/color]
True, but the version of GD bundled with PHP (equivalent to nearly the latest
2.0 series of GD plus some extra patches) has had read-only GIF support
restored a few versions ago - imagecreatefrom gif works, but imagegif won't.
What would you then recommend as an alternative to imagegif() since
it's READ-ONLY (verifying with PHP 4.3.2 and imagetypes() verifies its
existence but apparently cannot be used)?
Thanx
Phil
Andy Hassall <andy@andyh.co. uk> wrote in message news:<0p6l909uj s8bdqjtu4r9j6as n8tjqel3rv@4ax. com>...[color=blue]
> On Thu, 6 May 2004 20:49:14 +0100, "Filth" <p.macdonald@bl ueyonder.co.uk>
> wrote:
>[color=green][color=darkred]
> >> > I have only used the GD lib a little.
> >> > Is there a way to convert a file from a .gif to a .jpeg file?
> >>
> >> Use http://us3.php.net/manual/en/function.imagejpeg.php with
> >> http://us3.php.net/manual/en/functio...atefromgif.php as the
> >> source.[/color]
> >
> >might not work because of the following
> >
> >Note: 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.[/color]
>
> True, but the version of GD bundled with PHP (equivalent to nearly the latest
> 2.0 series of GD plus some extra patches) has had read-only GIF support
> restored a few versions ago - imagecreatefrom gif works, but imagegif won't.[/color]
"Phil Powell" <soazine@erols. com> wrote in message
news:1cdca2a7.0 405100537.58937 026@posting.goo gle.com...[color=blue]
> What would you then recommend as an alternative to imagegif() since
> it's READ-ONLY (verifying with PHP 4.3.2 and imagetypes() verifies its
> existence but apparently cannot be used)?
>
> Thanx
> Phil[/color]
"Leslie" <lesliethoare@h otmail.com> wrote in message news:<2ga4fcFf6 ngU1@uni-berlin.de>...[color=blue]
> "Phil Powell" <soazine@erols. com> wrote in message
> news:1cdca2a7.0 405100537.58937 026@posting.goo gle.com...[color=green]
> > What would you then recommend as an alternative to imagegif() since
> > it's READ-ONLY (verifying with PHP 4.3.2 and imagetypes() verifies its
> > existence but apparently cannot be used)?
> >
> > Thanx
> > Phil[/color]
>
> imagepng()[/color]
That doesn't work on GIF images, only on PNG. I would have to convert
them from GIF to PNG.
> > imagepng()[color=blue]
>
> That doesn't work on GIF images, only on PNG. I would have to convert
> them from GIF to PNG.
>
> Phil[/color]
Why would you? You could use the imagecreatefrom gif() function to read any
current gif images you may have, and use imagepng() to write your output as
png. Or is there some reason for you to need the output files to be gif? If
so, you're out of luck as far as GD is concerned.
Which is why I have to convert from GIF to PNG. They want them to be
viewable as actual resized images which can only be done if they are
not GIF images. Using gif2png works though nicely!
Phil
"Leslie" <lesliethoare@h otmail.com> wrote in message news:<2gebc1F1t esnU1@uni-berlin.de>...[color=blue][color=green][color=darkred]
> > > imagepng()[/color]
> >
> > That doesn't work on GIF images, only on PNG. I would have to convert
> > them from GIF to PNG.
> >
> > Phil[/color]
>
> Why would you? You could use the imagecreatefrom gif() function to read any
> current gif images you may have, and use imagepng() to write your output as
> png. Or is there some reason for you to need the output files to be gif? If
> so, you're out of luck as far as GD is concerned.
>
> -Leslie[/color]
Comment