Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions scan a image pixel by pixel

  • scan a image pixel by pixel

    Posted by Toni Pa on November 4, 2017 at 4:49 pm

    Hello, Im trying to move an image pixel by pixel so I can export squares of it as png, I need to move the image from x=160 to x=-119 and then go back to x=160 but y +1 to pass to the next line
    I have this so far so I can export the first line

    but how i make it move again to the left and add a pixel movement in y axis everytime I complete a line?

    Thank you for reading and let me know if you have the solution

    x=160;
    i=time;
    if (i<280/24){x=x+time*24*-1}else{x=160;}
    x;

    Andrei Popa replied 8 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    November 6, 2017 at 8:46 am

    I assume you have separated dimensions,24 fps. So i think this should work
    value+(time*24*-1)%280;

    and y is
    value+Math.floor((time*24)/280)
    I didn’t verify this, so if something goes wrong, respond and i will try to make it right.

    Andrei
    My Envato portfolio.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy