Created
May 25, 2014 04:36
-
-
Save robsbots/cb1d047eb286e1f07e6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loop A: loop over old_file_height // looping over each scan line in original file | |
loop B: | |
read each rgb-triple into an array // Read each pixel value in a complete scanline into an array | |
end loop B | |
skip over padding at end of scanline | |
loop C: loop n times // Set up a loop. loop resize times. Write the complete scan line n times. | |
loop D: loop trough pixel array // read each pixel from the array we just read. | |
Write pixel resize times.// Write the pixel out resize times. | |
end of loop D | |
write end of line padding // write new padding required for this scan line | |
end of loop D // go back and write the same pixel array for the next line | |
end of loop A // We have written each pixel n times, and each scanline n times, we have resized the file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment