3 ms·
If you download the pixel blender version of the kill white plugin, you can read the source. It looks pretty simple to implement; does just a little work while
by JTxt 13y ago
If you download the pixel blender version of the kill white plugin, you can read the source. It looks pretty simple to implement; does just a little work while in the HSV color space.
- mxfh 13y agoJust dived into that too, looks pretty straight-forward. Here is the comparison between KillWhite's method and gimp's color to alpha: http://i.imgur.com/FGJE97r.png http://i.imgur.com/FGJE97r.png Note that it adds transparency pretty much everywhere on the apple and alters it too much. (Reflection on apple is gone after blending with new background)
- JTxt 13y agoI'm about 98% certain: Killwhite is identical to Gimp's "Color to Alpha" if you use white as source color. In their example, it leaves a grey color background with a little alpha. They started with a brighter blue, and was dimmed by the their resulting image. I'm guessing that in your example, you used the background grey as the input color, so it took the background to clear, then you used a color sample of Killwhite's background to use as the background of yours. ...but I may be wrong. edit: I am playing with it, and if you use white as the color, then put the result on the white background, it's identical to the original., if you do the same with the grey color, same results. So "Color to Alpha" is the same, just allows you to pick a color.
- mxfh 13y agoThey are not identical. If this [1] is the actual code it looks like it's operating in RGB color space. Which explains why it extracts the lowest value color component as alpha from every pixel and not just from those with low saturation. alpha1 = (1 - a1) / (c1); This is done three times, for each RGB channel once. c is the selected color (in this case white with c1, c2, c3 = 1) a are the channels of the current pixel (a1, a2, a3) Later the highest alpha (lowest transparency) is kept for the output. Which results in the effect that all highlights, regardless of their saturation, are made transparent. Meanwhile the core function of KillWhite is executed in HSV color space: Alpha = 1 - (Value - Saturation) Here Saturation reduces transparency! This is not the case in color to alpha. [1] https://git.gnome.org/browse/gimp/tree/plug-ins/common/colortoalpha.c?id=bcd98991017f85aff90aee36451970d59edcb95d https://git.gnome.org/browse/gimp/tree/plug-ins/common/color... [2] http://stackoverflow.com/a/14915403/731179 http://stackoverflow.com/a/14915403/731179 if there is need for further discussion I would suggest switching to stackexchange. Adding to http://superuser.com/questions/348167/how-can-i-remove-all-white-parts-from-an-image-in-photoshop http://superuser.com/questions/348167/how-can-i-remove-all-w... or http://graphicdesign.stackexchange.com/questions/13073/alpha-transparency-remove-background-photoshop http://graphicdesign.stackexchange.com/questions/13073/alpha... or open something new