@@ -206,9 +206,9 @@ public function create($frames, $durations = self::DEFAULT_DURATION, $loop = 0)
206
206
$ this ->transparent_color = imagecolortransparent ($ resourceImg );
207
207
}
208
208
209
- for ($ j = (13 + 3 * (2 << (ord ($ this ->frameSources [$ i ] { 10 } ) & 0x07 ))), $ k = TRUE ; $ k ; $ j ++) {
209
+ for ($ j = (13 + 3 * (2 << (ord ($ this ->frameSources [$ i ][ 10 ] ) & 0x07 ))), $ k = TRUE ; $ k ; $ j ++) {
210
210
211
- switch ($ this ->frameSources [$ i ] { $ j } ) {
211
+ switch ($ this ->frameSources [$ i ][ $ j ] ) {
212
212
213
213
case '! ' :
214
214
if ((substr ($ this ->frameSources [$ i ], ($ j + 3 ), 8 )) == 'NETSCAPE ' ) {
@@ -295,9 +295,9 @@ protected function gifAddHeader()
295
295
{
296
296
$ cmap = 0 ;
297
297
298
- if (ord ($ this ->frameSources [0 ] { 10 } ) & 0x80 ) {
298
+ if (ord ($ this ->frameSources [0 ][ 10 ] ) & 0x80 ) {
299
299
300
- $ cmap = 3 * (2 << (ord ($ this ->frameSources [0 ] { 10 } ) & 0x07 ));
300
+ $ cmap = 3 * (2 << (ord ($ this ->frameSources [0 ][ 10 ] ) & 0x07 ));
301
301
302
302
$ this ->gif .= substr ($ this ->frameSources [0 ], 6 , 7 );
303
303
$ this ->gif .= substr ($ this ->frameSources [0 ], 13 , $ cmap );
@@ -314,34 +314,34 @@ protected function gifAddHeader()
314
314
*/
315
315
protected function addGifFrames ($ i , $ d )
316
316
{
317
- $ Locals_str = 13 + 3 * (2 << (ord ($ this ->frameSources [ $ i ] { 10 } ) & 0x07 ));
317
+ $ Locals_str = 13 + 3 * (2 << (ord ($ this ->frameSources [ $ i ][ 10 ] ) & 0x07 ));
318
318
319
319
$ Locals_end = strlen ($ this ->frameSources [$ i ]) - $ Locals_str - 1 ;
320
320
$ Locals_tmp = substr ($ this ->frameSources [$ i ], $ Locals_str , $ Locals_end );
321
321
322
- $ Global_len = 2 << (ord ($ this ->frameSources [0 ] { 10 } ) & 0x07 );
323
- $ Locals_len = 2 << (ord ($ this ->frameSources [$ i ] { 10 } ) & 0x07 );
322
+ $ Global_len = 2 << (ord ($ this ->frameSources [0 ][ 10 ] ) & 0x07 );
323
+ $ Locals_len = 2 << (ord ($ this ->frameSources [$ i ][ 10 ] ) & 0x07 );
324
324
325
- $ Global_rgb = substr ($ this ->frameSources [ 0 ], 13 , 3 * (2 << (ord ($ this ->frameSources [ 0 ] { 10 } ) & 0x07 )));
326
- $ Locals_rgb = substr ($ this ->frameSources [$ i ], 13 , 3 * (2 << (ord ($ this ->frameSources [$ i ] { 10 } ) & 0x07 )));
325
+ $ Global_rgb = substr ($ this ->frameSources [ 0 ], 13 , 3 * (2 << (ord ($ this ->frameSources [0 ][ 10 ] ) & 0x07 )));
326
+ $ Locals_rgb = substr ($ this ->frameSources [$ i ], 13 , 3 * (2 << (ord ($ this ->frameSources [$ i ][ 10 ] ) & 0x07 )));
327
327
328
328
$ Locals_ext = "! \xF9\x04" . chr (($ this ->dis << 2 ) + 0 ) . word2bin ($ d ) . "\x0\x0" ;
329
329
330
- if ($ this ->transparent_color > -1 && ord ($ this ->frameSources [$ i ] { 10 } ) & 0x80 ) {
330
+ if ($ this ->transparent_color > -1 && ord ($ this ->frameSources [$ i ][ 10 ] ) & 0x80 ) {
331
331
332
- for ($ j = 0 ; $ j < (2 << (ord ($ this ->frameSources [$ i ] { 10 } ) & 0x07 )); $ j ++) {
332
+ for ($ j = 0 ; $ j < (2 << (ord ($ this ->frameSources [$ i ][ 10 ] ) & 0x07 )); $ j ++) {
333
333
334
- if (ord($ Locals_rgb { 3 * $ j + 0 } ) == (($ this ->transparent_color >> 16 ) & 0xFF ) &&
335
- ord($ Locals_rgb { 3 * $ j + 1 } ) == (($ this ->transparent_color >> 8 ) & 0xFF ) &&
336
- ord ($ Locals_rgb { 3 * $ j + 2 } ) == (($ this ->transparent_color >> 0 ) & 0xFF )
334
+ if (ord ($ Locals_rgb[ 3 * $ j + 0 ] ) == (($ this ->transparent_color >> 16 ) & 0xFF ) &&
335
+ ord ($ Locals_rgb[ 3 * $ j + 1 ] ) == (($ this ->transparent_color >> 8 ) & 0xFF ) &&
336
+ ord ($ Locals_rgb[ 3 * $ j + 2 ] ) == (($ this ->transparent_color >> 0 ) & 0xFF )
337
337
) {
338
338
$ Locals_ext = "! \xF9\x04" .chr (($ this ->dis << 2 ) + 1 ).chr (($ d >> 0 ) & 0xFF ).chr (($ d >> 8 ) & 0xFF ).chr ($ j )."\x0" ;
339
339
break ;
340
340
}
341
341
}
342
342
}
343
343
344
- switch ($ Locals_tmp { 0 } ) {
344
+ switch ($ Locals_tmp[ 0 ] ) {
345
345
346
346
case '! ' :
347
347
@@ -358,7 +358,7 @@ protected function addGifFrames($i, $d)
358
358
break ;
359
359
}
360
360
361
- if (ord ($ this ->frameSources [$ i ] { 10 } ) & 0x80 && $ this ->imgBuilt ) {
361
+ if (ord ($ this ->frameSources [$ i ][ 10 ] ) & 0x80 && $ this ->imgBuilt ) {
362
362
363
363
if ($ Global_len == $ Locals_len ) {
364
364
@@ -368,21 +368,21 @@ protected function addGifFrames($i, $d)
368
368
369
369
} else {
370
370
371
- $ byte = ord($ Locals_img { 9 } );
371
+ $ byte = ord ($ Locals_img[ 9 ] );
372
372
$ byte |= 0x80 ;
373
373
$ byte &= 0xF8 ;
374
- $ byte |= (ord ($ this ->frameSources [0 ] { 10 } ) & 0x07 );
375
- $ Locals_img { 9 } = chr ($ byte );
374
+ $ byte |= (ord ($ this ->frameSources [0 ][ 10 ] ) & 0x07 );
375
+ $ Locals_img[ 9 ] = chr ($ byte );
376
376
$ this ->gif .= $ Locals_ext .$ Locals_img .$ Locals_rgb .$ Locals_tmp ;
377
377
}
378
378
379
379
} else {
380
380
381
- $ byte = ord($ Locals_img { 9 } );
381
+ $ byte = ord ($ Locals_img[ 9 ] );
382
382
$ byte |= 0x80 ;
383
383
$ byte &= 0xF8 ;
384
- $ byte |= (ord ($ this ->frameSources [$ i ] { 10 } ) & 0x07 );
385
- $ Locals_img { 9 } = chr ($ byte );
384
+ $ byte |= (ord ($ this ->frameSources [$ i ][ 10 ] ) & 0x07 );
385
+ $ Locals_img[ 9 ] = chr ($ byte );
386
386
$ this ->gif .= $ Locals_ext .$ Locals_img .$ Locals_rgb .$ Locals_tmp ;
387
387
}
388
388
0 commit comments