GIMP

我在Gimp中使用pdb.gimp_by_color_select遇到问题

我已经看过这个question

这就是我所拥有的:

# duplicate layer
duplicate_layer(image,"temp")
tempLayer = pdb.gimp_image_get_active_layer(image)
colour = (0,0)
operation = 0 
pdb.gimp_selection_none(tempLayer)
pdb.gimp_by_color_select(tempLayer,colour,operation,True,False,True)

只有它不会像我期望的那样在新复制的临时图层中选择任何黑色像素。

这是图片的摘录

GIMP

线条不是纯黑色(0,0),但我会进行自动调平

# Auto layers
pdb.gimp_drawable_levels_stretch(tempLayer)

事先在图像上

coolcat006 回答:GIMP

如果您查看picture histogram,则“黑色”实际上是一个相当宽的范围,从40到100,峰值约为75:

enter image description here

即使经过水平拉伸,您的大多数黑色像素仍不是完全黑色:

enter image description here

如果将图像的阈值限制在100左右,则可以使用该图层的另一个副本来获得更好的效果(选择适用于该图像的任何层,而与获取该图像所使用的层无关)。

本文链接:https://www.f2er.com/2677114.html

大家都在问