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
Solved

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

Posted on 2011-02-21
5
432 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
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adobe Illustrator CC 2015 - colors disappeared 3 160
Photo Display Application 4 73
Settings in MS Paint 10 65
Best place to store my family photos 11 77
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
In a previous article here at Experts Exchange (http://www.experts-exchange.com/articles/18414/Create-a-PDF-file-with-Contact-Sheets-montage-of-thumbnails-for-all-JPG-files-in-a-folder-and-each-of-its-subfolders-using-an-automated-batch-method.html)…
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…
Microsoft Office Picture Manager is not included in Office 2013. This comes as quite a surprise to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This video expla…

839 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