Advertisement
jargon

Roe mk11 TILES Builder pseudocode

Oct 10th, 2021
1,518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1.             //pseudocode:
  2.            
  3.             //loop through width and height of source image
  4.            
  5.             //get color in image $image[ 'mask' ] at pixel ($col,$row)
  6.             $pix[ 'mask' ] = imagecolorat( $image[ 'mask' ], $col, $row );
  7.  
  8.             //get color in image $image[ 'rgb' ] at pixel ($col,$row)
  9.             $pix[ 'rgb' ] = imagecolorat( $image[ 'rgb' ], $col, $row );
  10.            
  11.             //if pixel in $image['mask'] at ($cow,$row) is white:
  12.                  
  13.                 //set pixel in $image['combo'] at ($cow,$row) as fully transparent
  14.             //else
  15.                 //set pixel in $image['combo'] at ($cow,$row) as pixel color in $image['rgb'] at ($cow,$row) with full opacity
  16.            
  17.             //save resulting image as new file
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement