Solved

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

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

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 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 …
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

738 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