By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

ImageGif

P: 18
I had a problem with ImageGif().
I am using GD 2.0.
i know it wont support the ImageGif(), I tried with ImagePng() and ImageJpeg(), these didnt help me fully.
Post me any Solutions...
May 5 '07 #1
Share this Question
Share on Google+
8 Replies


pbmods
Expert 5K+
P: 5,821
I had a problem with ImageGif().
I am using GD 2.0.
i know it wont support the ImageGif(), I tried with ImagePng() and ImageJpeg(), these didnt help me fully.
Post me any Solutions...
What problem are you encountering? What version of PHP are you using? GIF support was disabled for awhile (I believe it had something to do with software patents), but PHP 4 and 5 both should support it.

What is the output of
Expand|Select|Wrap|Line Numbers
  1. print_r(gd_info());
?
May 5 '07 #2

P: 18
My PHP Version is 4.3.4 and GD Version bundled (2.0.15 compatible)

I got the problem while creating a thumbnail from the Gif Image.

From the PHP Manual I got
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.

and also

the ImageGif() function is missed from the list got from
get_defined_functions()

Could you help me in this regards.
May 5 '07 #3

pbmods
Expert 5K+
P: 5,821

the ImageGif() function is missed from the list got from
get_defined_functions()

Could you help me in this regards.
Is PHP using an external GD library, or did you use the one bundled with the PHP distro (i.e., when you configured PHP, did you use --with-gd=/path/to/gd, or did you just use --with-gd [preferred, btw])?
May 5 '07 #4

P: 18
I got this with the php_info(),

'./configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--target=i386-redhat-linux' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-apxs2=/usr/sbin/apxs'


And I got this with the gd_info(),

[GD Version] => bundled (2.0.15 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[T1Lib Support] =>
[GIF Read Support] => 1
[GIF Create Support] =>
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>

I think the problem is with the Property,
[GIF Create Support] => "Empty".

Is this affect the execution?
May 5 '07 #5

pbmods
Expert 5K+
P: 5,821
Looks like you're using the bundled gd library. Good.

No gif create support means you can't imagegif. Use imagejpeg or imagepng instead.

It's a lot easier than recompiling PHP.
May 5 '07 #6

P: 18
Looks like you're using the bundled gd library. Good.

No gif create support means you can't imagegif. Use imagejpeg or imagepng instead.

It's a lot easier than recompiling PHP.
I already tried with ImagePng(), its not help me fully.
I got a black image instead of the Thumbnail.

Could you tell me, how to enable the "Create Gif Support" ?
May 5 '07 #7

Motoma
Expert 2.5K+
P: 3,235
I would love to help you, however, you have not asked a question. We all understand that due to licensing issues, GIF support has been removed from the GD Library. You say, though, that JPEGs and PNGs are not working. What does your code look like? What are you trying to do? What error messages do you get when you try to use them?

I had a problem with ImageGif().
I am using GD 2.0.
i know it wont support the ImageGif(), I tried with ImagePng() and ImageJpeg(), these didnt help me fully.
Post me any Solutions...
May 6 '07 #8

pbmods
Expert 5K+
P: 5,821
I already tried with ImagePng(), its not help me fully.
I got a black image instead of the Thumbnail.
Are you trying to use imagegif to load the image? Use imagecreatefromgif instead.

http://www.php.net/manual/en/functio...atefromgif.php
May 6 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.