Menu Home

Extracting Transparent PNGs

As I was about to start prepping a scenario for online play this weekend I ran into the blog topic for this week – How to extract transparent background images from adventure pdfs. I know a lot of folks struggle with this, so I decided to do a quick tutorial. Before I get started though, I feel like its important to stress that you should NEVER steal art from a publication to use for other commercial purposes! Its theft, from the artist, from the publisher, and from everyone who worked to make that product. You are also vulnerable to lawsuits from all of the above parties. Don’t do it.

That said, extracting art to make your game more immersive is well within the intent of a published adventure, and so long as you aren’t being paid to GM, shouldn’t be part of a commercial enterprise. Nonetheless, because of the legal issues I’ll be using my own adventure to demo here – Added Value, which happens to be on sale this weekend for only 99 cents!

Added Value - A level 1 Cyberpunk Style adventure for Starfinder
Added Value – A level 1 Cyberpunk Style adventure for Starfinder available this weekend for only 99 cents!

First step is always going to be to open the adventure in Adobe Acrobat. You can use other pdf readers, but Acrobat is the industry standard, and it’s going to play well with the rest of the Adobe suite so that’s my default. Once you’ve done that you can determine if you are going to be doing this the easy way, the regular way, or the hard way.

THE EASY WAY

right click and go to Edit Image
Edit Image

Pdf publications aren’t always locked when they are published, or don’t have all features locked down. You can tell this is the case once you open your pdf if you right click on the image you want to extract and go to edit image – either Acrobat will change to edit mode, or it will ask you for the password for the locked pdf.

Edit Using - Adobe Photoshop
Edit Using – Adobe Photoshop

If you got edit mode, the process is pretty easy. Just right click the image again and choose ‘Edit Using – Adobe Photoshop.’ If the source image is a transparent PNG then boom, you have a reduced resolution version that you just need to save to your computer from Photoshop.

Your Transparent PNG is ready to save!
Your Transparent PNG is ready to save!

THE REGULAR WAY

Locked pdfs don’t give you access to source files, even at a reduced resolution. Instead you have the option to save the image from the pdf.

Save Image As
Save Image As

Ideally this will give you a JPG file with a white background. You can use that as is, but if you want to get the transparent background you are going to need to open that JPG in Photoshop.

Open JPG in Photoshop
Open JPG in Photoshop

Once you have it open, you will need to go to the layers panel and create a layer from the background image. Then, go to the magic wand tool. I favor a Tolerance setting around 20 to 30, depending on how different the image is from the white background. Also, unless you want to select all white in the image, make sure you have Contiguous checked for the wand tool. Now, one click will get you most of the background, but you will probably have to zoom in and click other pockets of white with the wand to get everything you want to remove selected (like in the hair here).

The Magic Wand tool
The Magic Wand tool

Now that you’ve got all the white you want to remove selected, go to the Select option up top, then Modify, and Expand 1px. This smooths your selection and will hopefully get all the white and semi-white around the edges. Then delete, and save as a PNG with a transparent background.

Modify selection
Modify selection

THE HARD WAY

Sometimes you can’t Save Image from the pdf. Fear not though, all PCs come with the ability to copy everything on your screen. Just open the pdf, go to the page with the image, and hit the Print Screen (or PRT SC) button. This buffers a screenshot of the whole screen to your Clipboard.

Now go to Photoshop and open a new image with the Clipboard dimensions. Voila, there’s your screen. You’ll want to crop down to the image to limit how much clean up you will need to do.

Crop the image
Crop the image

Once you’ve cropped, create a new layer from the background image, and I like to make another layer underneath with a solid color that contrasts with everything in the image, so you can clearly see what needs to be deleted. Then, using the Rectangle Marquee tool I grab as much as I can of the non-image areas and delete them.

Delete blocks
Delete blocks

As you can see, we still need to get a lot of the text and stuff out of there. So now switch to the Eraser tool, with a Hard Round brush selected and Hardness set to 100%. This is important as you want a hard edge to erase sections so that whatever we don’t get with the Eraser we can get with the Magic Wand tool. See above for best practices there.

Erase then Magic Wand
Erase then Magic Wand

Once you’ve got it trimmed, delete the solid color background and save as transparent PNG!

Ready to delete the green then save
Ready to delete the green then save

As always, if you liked this post, or any of the other material available on Solo Run Studio feel free to spot me some coffee money (just click the coffee cup shaped icon on the bottom right of the page.)

Until next time!

Categories: Article Writing

Jeremy Corff

Artist and Writer