Adventure Game Studio

Creative Production => Critics' Lounge => Topic started by: Igor on Sun 24/02/2008 12:21:36

Title: Photoshop question
Post by: Igor on Sun 24/02/2008 12:21:36
Hello!
I have a PS problem that i just can't find a solution for.. so, i hope some of you might know the answer.

I have a pencil drawing that i scan in (as greyscale image). I import it in Photoshop, where i want to make the white background (paper) transparent in such a way, that there wouldn't be any grey pixels, but instead, they would be transparent too (that means: lighter parts of line would be more transparent than dark ones).

To make it more clear where my problem is, i made 2 example pictures:

(http://www.bugbrain.com/igor/photoshop/psquestion1.jpg)

And here's what i would like to get:

(http://www.bugbrain.com/igor/photoshop/psquestion2.jpg)



A few years back someone already told me the solution to this problem (and very elegant too- with just a few clicks), but i forgot to write it down  :-\ All I know is, that it contained masks.

Anyway, thank you in advance for ANY pointers!
Title: Re: Photoshop question
Post by: Gilbert on Sun 24/02/2008 12:33:19
Don't know about PS, but in GIMP, there is

Layer -> Transparancies -> colour to alpha

I think PS should have a similar option.
Title: Re: Photoshop question
Post by: radiowaves on Sun 24/02/2008 13:15:46
Go to layer blending options and select multiply. You can control the amount and effectivness from there also. If it doesn't work perfectly, you might want to use curves or just add a bit more contrast (which shouldn't lose much information on such a simple piece).

Leave the bg white and magic wand tool is just pure evil, ok?
Title: Re: Photoshop question
Post by: Igor on Sun 24/02/2008 13:43:03
Thank you both for help!

Gilbot- i just downloaded GIMP (didn't use it before)- and your solution is exactly what i needed! Thanks a lot!

Does anyone know if something like that is also possible in PS? If not, i'll just do the trick in GIMP and save the picture in PNG with alpha.
Title: Re: Photoshop question
Post by: CaptainBinky on Sun 24/02/2008 13:57:08
Ctrl+A and Ctrl+X to cut the image.
Create a new alpha layer in the channels
Ctrl+V the image in there.
Ctrl + I to invert it (white on black)
Ctrl + left mouse button on the Alpha layer to select by transparency
Click back to your RGB layer and then fill the selection with black on a new layer

TADA!

You can play with levels on the alpha channel to strengthen / weaken your line as necessary.
Title: Re: Photoshop question
Post by: Igor on Sun 24/02/2008 14:25:02
Ah yes! That's it, many thanks! :)
Title: Re: Photoshop question
Post by: Nacho on Sun 24/02/2008 14:54:49
Hey, I has the same question for years in Pain Shop Pro... Can anyone help me?

Thanks in advance for those who will try to answer, and to Igor, for asking something I allways wanted to ask.
Title: Re: Photoshop question
Post by: loominous on Sun 24/02/2008 19:03:40
Along the lines of Binky's method, but more optimized:

Alt.1

1. Go to channels, and ctrl-click any of the rbg channels (or the gray channel)

2. Invert the selection with ctrl-shift-i

3. Create a new layer and fill the selection with black


Alt.2

1) Create a black layer beneath the stroke layer

2) Go to channels, and ctrl-click any of the rbg channels (or the gray channel)

3) Go back to the black layer, and click on the 'layermask' button (the one with a circle inside a square)

4) Invert the layermask with ctrl-i

(http://marcus.krupa.se/AGS/stroketoalpha.jpg)


Voila!
Title: Re: Photoshop question
Post by: Igor on Sun 24/02/2008 21:02:56
Hey Loominous, i just tried both of them out- fantastic! Really elegant solution, it will save me some time. Thanks! :)