PDA

View Full Version : Combining image and mask.



darrenan
June 11th, 2014, 05:19
All of the Paizo PDFs I've worked with so far seem to have two layers for all their images: the image itself surrounded in black, and a negative mask. I'm wondering if anyone knows of a way to combine those two to yield the image with a white background? I've tried using the fill function in Paint, but it's fill algorithm is a little brain dead and only fills small portions at a time. Up until now, I've just used the image with the black background but I'd like to have the image with a white background.

Also, if there was a way to combine them to yield a transparent background, does FG handle images with transparent portions? I'm guessing it must since most tokens are like that.

Thanks,
D.

Trenloe
June 11th, 2014, 05:30
I use GIMP and the fuzzy select tool. See posts #6 and #7 here: https://www.fantasygrounds.com/forums/showthread.php?20843-Transparency-help

darrenan
June 11th, 2014, 05:45
Turns out Paint.NET does a much better job of filling. I've never used GIMP, is it free?

Trenloe
June 11th, 2014, 05:50
I've never used GIMP, is it free?
Yep: https://www.gimp.org/

damned
June 11th, 2014, 08:32
I like GIMP. Learning curve? Yes. Powerful? Seriously so.
Fuzzy Select followed by shrink selection 2-5px should work...

Griogre
June 11th, 2014, 16:39
Paint.NET is a good "middle-weight" art program. If you are use to Windows interfaces, its easier to use than GIMP. GIMP is extremely powerful "heavy-weight" art program, like Damned says, but has a non-standard interface and part of the price of that power is a high level of complexity.

If you just want to edit a few pics then Paint.NET is fine. If you want a Photoshop like program where you can create anything from scratch, then GIMP is better. Using GIMP only for fuzzy selection and transparent fill is like using a 50 pound sledge to drive in a small nail.

darrenan
August 18th, 2014, 01:39
I figured out how to do what I originally wanted to do, and it turns out much nicer than the magic wand/fuzzy select method. These instructions are for Paint.Net, but any program that supports layers should be able to manage this as well.

1. Open the non-mask image.
2. Import the mask image into a new layer (Layers menu, select Import From File... and then select the mask image file).
3. Invert the colors on the mask image (Adjustments, Invert Colors).
4. Change the blending mode on the mask image layer to Additive.
5. Merge the mask layer down into the non-mask image. Voila!

EDIT: Verified that this works identically in GIMP as well. The results are much nicer because there aren't any random artifacts left over from the fuzzy select. You get back the image on a white background, nice and clean.