How do I make a script that takes in an image and does this:
1. Start at leftmost column of the image 2. Color the entire column white 3. Bucket fill the column red 4. Save the current image 5. Undo changes 6. move over one column 7. Repeat
This is the image I want to run this on. Perhaps you can figure out why.
>2. Color the entire column white >3. Bucket fill the column red why not colour the column red to start off with? unless you mean bucketfill the entire image red starting in some point in the column?
Ian Ward
> Literally 10 minutes of work.
We'll see if I complete it by the time the thread 404s
Noah Nguyen
If you color the column white then the bucket fill will spread across the image
Josiah Martinez
some kind of sierpinski triangle?
Zachary Walker
for column_index in image.columns: copy_of_img = img.copy() for row_index in [0, ..., image.height]: copy_of_img[column_index, row_index] = (255, 0, 0) call flood_fill(copy_of_img, (column_index, 0)) copy_of_img.save("column .png")
function flood_fill_white(img, coordinate): img[coordinate] = (255, 0, 0) for neighbour in neighbour_pixels(coordinate): if img[neighbour] is (255, 255, 255): call flood_fill_white(img, neighbour)
Chase Evans
lads
Liam Carter
just use paint lol
Luke Wood
I got it to generate the images with the white columns
How do I get it so that the frames are in order when I run
convert -delay 2 -loop *.png animated.gif
Nicholas Morris
If you have Matlab installed, you can do it with that. Otherwise use python like thia user
Caleb Roberts
Fucking figured it out
Jonathan Long
Still waiting for nate to deliver
Jordan Lewis
...
Eli Lewis
I got a better one for you. Extract the sound from this image.
Benjamin Cox
Looks like a fun challenge. 1. center the circle 2. convert its coordinates from polar to rectangular 3. read the value of the gray pixels lines by line 4. reconstruct the sound I guess?
Jack Butler
Your IDE and your os looks painfull to use daily.
Connor Cooper
LMAO just print it out and put it in your cd drive
Lincoln Robinson
OK fuck doing the Gif we're doing a webm
Anthony Murphy
Its more like vinyl
Liam Scott
its flood fill is shit but yeah
Jordan Martinez
also hiroshis shit site is not letting me post the code (connection error)
Print whole file listing of a .zip file somewhere on the internet into STDOUT in less than 2 seconds.
The program cannot download the whole file. Even if zip file is 4 gigs big, it has to print the contents out in less than 2 seconds. You should expect that the .zip file has not .ZIP file comment in the end of it.