Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-21
5
Medium Priority
?
439 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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)…
Adults who share images on social media aren’t the only ones who need to worry about their privacy. Our culture’s tendency to share every move and celebration affects the privacy of our children, too.
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…
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

972 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