no halting if object is pushed multiple times

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
gubach
Posts: 45
Joined: 2013-12-13T11:13:29-07:00
Authentication code: 6789

no halting if object is pushed multiple times

Post by gubach »

I want to push an image object with one image multiple times in an other image object, but for $A > 2 this seems not to halt

Code: Select all

for ($p = 1; $p <= $A; $p++) {
	push(@$img_list, $img);
};  
Have also tried push(@$img_list, @$img); Only if $img is written and multiple times read it works. The same problem is shown if image object $img has several images.

Any suggestions to fix this? Thank you!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: no halting if object is pushed multiple times

Post by magick »

Use
  • push(@$img_list, $img->Clone());
Post Reply