Solved

10,864 png icons with white background, I want to make them all transparent, any simple solution?

Posted on 2011-02-21
5
436 Views
Last Modified: 2012-05-11
It would take me years to insert transparency into those 10.864 icons one by one. Their white background are pretty solid white, except for a small shadow behind them.
I would like to make their background transparent instead of white.
Is there any simple way? Like a batch, bulk, website, application, whatever.

Thanks guys.
0
Comment
Question by:John86a
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Ugo Mena
ID: 34946727
you can certainly use a Photoshop batch action to complete this task. There are a couple of caveats though. Based on what you are trying to do, I think you are going to need to make sure that Photoshop's selection tool threshold is set really low so that you are only selecting the white (color value) background. And you are probably going to need to add a transparent layer underneath your background layer if your background layer does not already have a transparent background assigned.

As long as the icons are the same size and you are selecting the same white (color value) it should be fairly straightforward.
Open Photoshop and practice adding the transparent layer underneath your background, select and remove the white background and resave.

Once you are happy with the results, you are ready to record your action.
After you have the action recorded, you can use the Automate function in Photoshop to complete the action on all the files within your icons folder.

There is a lot to setting this up correctly, so take your time setting up the action.
0
 

Accepted Solution

by:
John86a earned 0 total points
ID: 34947538
Sorry, I found another way to fix it with Imagemagick.

Made the following bat files..

To add transparency to the icons:
for /f %%a in ('dir /b *.png') do FOLDER %%a -gravity Center -crop 32x32+0+0 +repage png32:%%a
pause

To crop images from 40x40 to 32x32:
for /f %%a in ('dir /b *.png') do FOLDER %%a -gravity Center -crop 16x16+0+0 +repage png32:%%a
pause

Thanks anyways

0
 

Author Comment

by:John86a
ID: 34947565
Sorry, just to add, FOLDER variable should be imagemagick's converter path, i.e.: C:\imagemagick\converter.exe
0
 
LVL 13

Expert Comment

by:Ugo Mena
ID: 34947818
glad you found a solution that works for you.
0
 

Author Closing Comment

by:John86a
ID: 34986595
Imagemagick was a life saver.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
PaperPort 14.5 Patch 1 update is often not detected or downloaded automatically. This article provides direct download links to solve the problem for retail (non-bundled) versions of the Standard and Professional editions, as well as the Professiona…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question