Solved

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

Posted on 2011-02-21
5
427 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
glad you found a solution that works for you.
0
 

Author Closing Comment

by:John86a
Comment Utility
Imagemagick was a life saver.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

With the recent demise of Windows XP support, you may be a new convert to Windows 7 or Windows 8. Or perhaps you've been on W7 or W8 for a while, but just recently acquired your first scanner for the new OS. In either case, you are likely to be very…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now