- Method select_from
object select_from(int x, int y)
object select_from(int x, int y, int edge_value)
Makes an grey-scale image, for alpha-channel use.
This is very close to a floodfill.
The image is scanned from the given pixel, filled with 255 if the color is the same, or 255 minus distance in the colorcube, squared, rightshifted 8 steps (see distancesq).
When the edge distance is reached, the scan is stopped. Default edge value is 30. This value is squared and compared with the square of the distance above.
35, 35, 16 35, 35, 32 35, 35, 64 35, 35, 96 35, 35, 128 35, 35, 192 35, 35, 256 original original * select_from(35,35,200)
- Parameter x
- Parameter y
originating pixel in the image
the new image object
- See also