PHP Classes

GIFEncoder not working for me

Recommend this page to a friend!

      GIF images into animated GIF with native PHP class  >  All threads  >  GIFEncoder not working for me  >  (Un) Subscribe thread alerts  
Subject:GIFEncoder not working for me
Summary:Running sample code out of box with corrupted results.
Messages:2
Author:Alan Smith
Date:2013-03-25 04:37:20
Update:2013-03-25 08:28:33
 

  1. GIFEncoder not working for me   Reply   Report abuse  
Picture of Alan Smith Alan Smith - 2013-03-25 04:37:20
As the many posts to the forum attest, this class obviously works, but not for me!
I have used the sample code from the site and implemented both the
Header ( 'Content-type:image/gif' ); and
Header ( 'Content-disposition:Attachment;filename=myanimation.gif');
The program runs and generates output, but it appears as a broken frame in IE and Chrome.
I'm running on a commercial Debian web server with PHP 5.2 .
I've generated the gif images locally and tested that they have uploaded to my frames directory.

I can't read gif, but have pasted the top of the HTTP conversation below.
Any suggestions would be welcomed.


GET /projects/imos/video.php HTTP/1.1
Host: gpsanimator.com
Connection: keep-alive
Cache-Control: max-age=0
Authorization: Basic YWxhbnM6NDQ0NA==
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.33 Safari/537.31
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: PHPSESSID=96533a1d5ef2878261d026abab1d7431



HTTP/1.1 200 OK
Date: Mon, 25 Mar 2013 03:37:10 GMT
Content-Type: image/gif
Content-Length: 1304546
Connection: close
Server: Nginx / Varnish
X-Powered-By: PHP/5.2.17
Cache-Control: private, pre-check=0, post-check=0, max-age=0
Expires: 0
Pragma: no-cache

GIF89a..................
.........5..!!!)''***+++(/,,4<-4=06477707?<<<..W..z2:B5=E9@I<CL?GPW..W.WWW.EEEHNLBJSDMWEO[GP[FP\FQ]GR^IS^PPPTTT]]]IS`IUaKWdLVbLXdLXeMYfMZfN[gO[hO\hO\iO^nO_oP\iQ_lR_mP_nR`nRaoSboUboQ`pQaqRbpQbqRbrRbsSctRdsSfuUbpTcsVdrUdsUdtUduVfuVfvWgwUhwVixXftXfuXgvXgwZhvYhwXhxXjxkkkoooptswwwzzzx|{......................*..9..W..I..X..g..x.W..WW...7..D..Q..`..r........+.. ......j.........................................W..W...............)..6...W.W..uu.WW.......//.??.C..P..\..g..r..|..yy.[[.__...................................W..W.............................................................................................................................................................................................................................................!..NETSCAPE2.0.....!.......,............y..H......*\......#J.H.....3j...... C..I....(..1.....0c..I.^4i-k..)S...<...&....H.*].....P.J.J....X.j..U)..`..
K....h..].....p]>y9Rf..x....w...q...L......+.)e...0.J.,.&...3k......a.........I.^......c....!.......@/._.N.M.0.A.
e+_......i;....A..u....;^.........Bw...D.>9......O_...\.....@...).[w.......e^B..g...58....g...f..g.!.B70....!.7.ww..@L.L..y."..L...../.(..<....@r5....pMQ&..[.1Y.K..m.PQ...P.Xf...\.4dm.u@.QI..dy3..Mp..x.Q.t`.l.h0.2..C..dx..3p.I.3.M..Lz.)(...J...&
.#....Ku...:1%z)=.
........D...759.W.J...&M.....;...L..0'l.4.'3....=......lp(3...l..>....|.....4....;....k....KS.....9.......[..*.."...i....[.<.tq%l.l
*%..3.............*.0=.k..K.W.'.4..1*..dr.+....0w.*.....;..c..9.{.w1y.
.Q...<....9H..4..1.,2....:....KUo.5.0].q.1u..;.|\..f....p..9.B.......}7.>.
.K....p..$a<. 0...O..,.ZL2..c....J.u....q...Y...8.A.jsL..q....s3..3..S.....W....b.+..P;.<.AA...$l.0K:........4.L.O:h....p...B....n.....P5.....~+H.6../....o........#.=061...z.|X...9...O....&G9.".}..`k.'....E....B"....e....\.B.a.b.{ LZ...&..b,...5...f..$|I..W8...[01W....8.MZ.J......

eLt...x.)V1.\,W.}H.2&&....].X.4vD6.0..........ba#.(...1.

  2. Re: GIFEncoder not working for me   Reply   Report abuse  
Picture of Alan Smith Alan Smith - 2013-03-25 08:28:33 - In reply to message 1 from Alan Smith
Turns out I introduced some non-printing characters when I copied/pasted the code, instead of downloading it.
D'OH
Working beautifully now.