Problem after update
Posted: 2009-10-06T11:09:17-07:00
Hello, guys.
Please, help me to understand where the problem is.
The problem arised after I've upgraded IM from 6.4.5 to 6.5.6-7.
After that white rectangle appeared on the gif below.
Original image
Here is script which I use to generate this movie.
Please, help me to understand where the problem is.
The problem arised after I've upgraded IM from 6.4.5 to 6.5.6-7.
After that white rectangle appeared on the gif below.
Original image
Here is script which I use to generate this movie.
Code: Select all
#!/usr/bin/perl
use strict;
use Image::Magick;
my $img_orig = Image::Magick->new();;
$img_orig->Read( 'original.jpg' );
my $img = Image::Magick->new( size => $img_orig->Get('width').'x'.$img_orig->Get('height') );
$img->Set( page => $img_orig->Get('width').'x'.$img_orig->Get('height') );
my $maxi = 5;
for(my $i=0; $i<$maxi; $i++){ $img->Read( 'xc:white' ); }
my ($w,$h) = $img->Get('width','height');
my $img_tmp1 = $img_orig->Clone();
$img_tmp1->Crop( width => int($w/2), height => int($h/2), x => 0, y => 0);
my $img_tmp2 = $img_orig->Clone();
$img_tmp2->Crop( width => int($w/2), height => int($h/2), x => int($w/2), y => 0);
my $img_tmp3 = $img_orig->Clone();
$img_tmp3->Crop( width => int($w/2), height => int($h/2), x => int($w/2), y => int($h/2));
my $img_tmp4 = $img_orig->Clone();
$img_tmp4->Crop( width => int($w/2), height => int($h/2), x => 0, y => int($h/2));
$img->[0] = $img_orig->Clone();
$img->[0]->Set( 'delay' => 120 );
$img->[1]->Set( 'delay' => 30 );
$img->[2]->Set( 'delay' => 30 );
$img->[3]->Set( 'delay' => 30 );
$img->[4]->Set( 'delay' => 30 );
my $koef = $w > $h ? $w*0.02 : $h*0.02;
$img->[1]->Composite( image => $img_tmp1, geometry => '+'.int($w/2 + $koef).'-'.$koef );
$img->[1]->Composite( image => $img_tmp2, geometry => '+'.int($w/2 + $koef).'+'.int($h/2+$koef) );
$img->[1]->Composite( image => $img_tmp3, geometry => '-'.$koef.'+'.int($h/2+$koef) );
$img->[1]->Composite( image => $img_tmp4, geometry => '-'.$koef.'-'.$koef );
$img->[2]->Composite( image => $img_tmp1, geometry => '+'.int($w/2 + $koef).'+'.int($h/2+$koef) );
$img->[2]->Composite( image => $img_tmp2, geometry => '-'.$koef.'+'.int($h/2+$koef) );
$img->[2]->Composite( image => $img_tmp3, geometry => '-'.$koef.'-'.$koef );
$img->[2]->Composite( image => $img_tmp4, geometry => '+'.int($w/2 + $koef).'-'.$koef );
$img->[3]->Composite( image => $img_tmp1, geometry => '-'.$koef.'+'.int($h/2+$koef) );
$img->[3]->Composite( image => $img_tmp2, geometry => '-'.$koef.'-'.$koef );
$img->[3]->Composite( image => $img_tmp3, geometry => '+'.int($w/2 + $koef).'-'.$koef );
$img->[3]->Composite( image => $img_tmp4, geometry => '+'.int($w/2 + $koef).'+'.int($h/2+$koef) );
$img->[4]->Composite( image => $img_tmp1, geometry => '-'.$koef.'-'.$koef );
$img->[4]->Composite( image => $img_tmp2, geometry => '+'.int($w/2 + $koef).'-'.$koef );
$img->[4]->Composite( image => $img_tmp3, geometry => '+'.int($w/2 + $koef).'+'.int($h/2+$koef) );
$img->[4]->Composite( image => $img_tmp4, geometry => '-'.$koef.'+'.int($h/2+$koef) );
print "here we go\n";
$img->Write('movie.gif');