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
import com.sksamuel.scrimage.ImmutableImage | |
import com.sksamuel.scrimage.nio.PngWriter | |
import java.io.File | |
// Show image | |
// Implementation based on: | |
// https://github.com/python-pillow/Pillow/blob/77c098b01ffd599ec555d22ac76fd16563f4946f/src/PIL/ImageShow.py#L150-L162 | |
fun ImmutableImage.show() { | |
// Save image to a temp file | |
val f = File.createTempFile("tmp", ".png") |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
a@air-2:~/things$ python test_signals.py | |
parent process pid: 90614 | |
90615 0 | |
90616 1 | |
90617 2 | |
90618 3 | |
90619 4 | |
90620 5 | |
90621 6 | |
90622 7 |
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
a@air-2:~/things$ python test_signals.py | |
parent process pid: 90156 | |
signal handled in proc 90156 | |
90157 0 | |
90158 1 | |
90159 2 | |
90160 3 | |
90161 4 | |
90162 5 | |
90163 6 |