in reply to reversed colors png images.

Please update your original node and tell us where Perl comes into this. Then add some code that will run and demonstrate your problem. Once you have done that there are plenty of Monks who will help you with pleasure.

for more guidance see this node: How do I post a question effectively?

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!

Replies are listed 'Best First'.
Re^2: reversed colors png images.
by Anonymous Monk on Dec 18, 2013 at 15:52 UTC

    I'm making an animated gif with perl and i'm using the gd module. I use the newFromPng method to import images. Then i'm working on an animation that looks like:

    use GD; $img = GD::Image->newFromPng('test1.png'); $img2 = GD::Image->newFromPng('test2.png'); $img3 = GD::Image->newFromPng('test3.png'); $data = $img->gifanimbegin(1,0); $data.=$img->gifanimadd(0,0,0,1); $data.=$img2->gifanimadd(0,0,0,1); $data.=$img3->gifanimadd(0,0,0,1); $data.=$img->gifanimend; binmode STDOUT; print $data;

    I can't provide code to demonstrate my problem.But my problem is that the image colors get mixed up, so the screen starts blinking.

      1. Are your 3 images all the same size?
      2. What is the logic for adding the same image twice with just 1 x 1/100th of a second delay each?
      3. Do you expect to see the animation of 3 images, displayed for 0.02, 0.01 & 0.01 seconds each respectively, to actually visibly move?

      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
      Have you tried gifanimadd(1,0,0,1)?