Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tutorial for creating custom Windows icons from screenshots using only Irfanview freeware

36 views
Skip to first unread message

arlen holder

unread,
Apr 21, 2019, 11:15:20 PM4/21/19
to
Tutorial for creating custom Windows icons from screenshots using only Irfanview freeware

o Thanks to Jim on a.c.f, who supplied purposefully helpful IV suggestions.
<https://groups.google.com/d/msg/alt.comp.freeware/KCk4FpM9vZM/KEKUA6CqDAAJ>
<https://narkive.com/V4KyEyMa.2>

****************************************************************************
*How to screenshot an arbitrary image to create a custom shortcut icon*

(This tutorial describes how to create an icon with a transparent background
from any screenshot using a variety of software, where the initial goal was
to describe a method using _only_ Irfanview freeware.)

As always, please improve so that everyone benefits from every action.
****************************************************************************
============================================================================
*Basic Steps:*
A. Screenshot any desired image;
B. Set the background to be transparent, resize, & save as an ICO file;
C. Apply that icon file to an existing Windows shortcut.

NOTE: You can combine or skip some of the steps below which were broken out
in order to provide explanation simplicity, where the goal was to do it
all in Irfanview, which can be done, but the other tools do it better in
some cases (depending on the original image).
============================================================================
o *Create (or choose) a shortcut that you'd like to change the icon for.*

To create a test shortcut:
<https://www.digitalcitizen.life/how-create-shortcuts>
<https://www.thewindowsclub.com/create-desktop-shortcut-windows-10>

For my tests, I created two shortcuts, each with custom icons, for two tasks
o mount an encrypted volume as removable drive V: & open it up for viewing
o unmount all mounted encrypted volumes

Shortcut #1 target (mount a container as an encrypted removable drive):
C:\path-to\VeraCrypt.exe /volume C:\path-to\V.hc /letter V /auto /quit /explore

Shortcut #2 target (unmount all mounted containers):
o C:\path-to\VeraCrypt.exe /dismount /force

Note these shortcuts would otherwise default to the same Veracrypt icon
that the Veracrypt executable uses, which is harder to visually distinguish.
============================================================================
o *Determine your Windows system "Shell Icon Size" dimensions:*

Start > Run > regedit
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
Shell Icon Size = 32

NOTE: This informs you of "Shell Icon Size" dimension, which was, in my
case, 32x32 pixels (yours may vary).
============================================================================
o *Screenshot any desired image (which will likely have an "uneven" background):*
(i.e., some background pixels may be various degrees of semi transparency.)

For example, snap a screenshot of this bank icon example on the net:
<https://pngtree.com/freepng/vector-bank-icon_3991558.html>

Open the screenshot in Irfanview freeware & modify as needed, e.g.,
o Crop using Irfanview LeftMouseButton click-click sweep & control+y
o Closecrop using Irfanview shift+control+y
o Save using Irfanview control+s to a png file.
(For example, save as an "icon_vault01_original.png" file.)

NOTE: This method assumes you don't have a ready-made icon file, where the
goal is to snapshot anything you want to convert to an appropriate icon,
and where the background of that snapshot may not be all the same color.
============================================================================
o *Set the background to be as transparent as you can using Irfanview:*

Open the image in Irfanview freeware (or any other desired software):
o In Irfanview, you can not draw an ellipse selection circle
o In Irfanview, use "Image > Replace Color" to replace the background
(white in this case) to a color not used elsewhere in the image
(black works fine for this image).
o If the background wasn't purely one color, the result may be "jagged"

When you save with Irfanview control+s to png or ico, check the
"Show options dialog" so that a form pops up, named:
"PNG/PNM/ICO save options".
In that form check "Save Transparent Color" for PNG and/or ICO.
Irfanview will then ask every time you save a file to that format:
"Choose transparent color"
"Click in the image to select the transparent color."
After clicking on the background area, save the file to PNG or ICO.
(For example, save as an "icon_vault01_transparent.png" file.)
----------------------------------------------------------------------------
o Or... set the background to be transparent using Paint.NET plugins:

Download the "Unblend - reverse normal blend" plugin zip file from:
<https://forums.getpaint.net/topic/28014-unblend-reverse-normal-blend-with-a-chosen-color/>

Unzip the downloaded zip file & note the "dll" & "cs" resulting files.
Place those two files into the Paint.NET "Effects" folder.

Open the image in Paint.NET freeware with the "Unblend" plugin installed.
o Set the color to be removed as the Primary Color (transparency value is ignored).
o In Paint.NET, select "Effects > Unblend".
o Save using Paint.NET control+s to a PNG file with transparency:
(For example, save as an "icon_vault01_transparent.png" file.)

NOTE: The background is now evenly transparent outside the selecton area.

Note: As always, there are other ways to perform the task, for example:
Open the image in Paint.NET freeware (or any other desired software):
o In Paint.NET, draw an ellipse selection circle around the foreground image
o Crop to that ellipse using Paint.NET control+shift+x
o Save using Paint.NET control+s to a PNG file with transparency:
(For example, save as an "icon_vault01_transparent.png" file.)

Bear in mind, according to users of that plugin, they feel inverse
alpha compositing is an underdefined problem, because the alpha value
of the result is not unique. A pixel could be made more intense with a
lower alpha, or less intense with a higher alpha, and still give the
correct result when blended back on the background color.

The Unblend plugin is said to use a greedy algorithm, whereby it always
uses the minimum permitted value of alpha for each pixel, so that as
much of the background color is removed as possible.
----------------------------------------------------------------------------
o Or... set the background to be transparent using The GIMP freeware:
Open the image in The GIMP (version 2.4.7 is what I used).
Change The GIMP "Image > Mode > RGB" if not already set.
Select The GIMP "Layer > Transparency > Color to Alpha..."
Select the background (in this case, white) as the color to make transparent.
Click "OK".
Use The GIMP shift+control+s to save the resulting image in PNG format.
(For example, save as an "icon_vault01_transparent.png" file.)

Note: As always, there are other ways to perform the task, for example,
in The GIMP, you can select the background via The GIMP magic wand or
The GIMP color tool & then apply a layer mask using the sequence:
"Layer > Mask > Add layer mask" & then "Selection > [x]Invert mask > Add".
----------------------------------------------------------------------------
o Or... set the background to be transparent using Adobe Photoshop payware.
In Photoshop, use "Select > Color range" and hold down the Shift key to
then click on the color you need to remove (white in this case). Press OK.
Then all your white will be selected; now hit delete.
============================================================================
o *Convert the PNG to a properly sized ICO file with a transparent background:*
Open the png file in Irfanview.
Resize to 32x32 pixels using control+r.

Save to an ICO file using control+s.
When you save with Irfanview control+s to ico, check the "Show options dialog"
so that a form pops up, named: "PNG/PNM/ICO save options".
In that form check "Save Transparent Color" for PNG and/or ICO.
Irfanview will then ask every time you save a file to that format:
"Choose transparent color"
"Click in the image to select the transparent color."
After clicking on the background area, save the file to PNG or ICO.
(For example, save as an "icon_vault01_32x32.ico" file.)
============================================================================
o *Apply that ICO icon to an existing shortcut:*
RClick > (shortcut) > Properties > Shortcut > Change Icon > [Browse] >
(For example, select your "32x32_icon_vault01.ico" file.)
Apply > OK > OK

NOTE: The Windows shortcut should immediately change to the desired icon.
============================================================================
============================================================================
ADDENDUM:
While this tutorial strived to use _only_ Irfanview freeware to create icons,
it is readily acknowledged there are many ways to obtain/create custom icons.

For example, one can point to any of about 16 large collections in Windows.
o C:\windows\system32\shell32.dll (default icon location)
o C:\windows\system32\imageres.dll (folders, devices, actions)
o C:\windows\system32\ddores.dll (hardware devices and resources)
o C:\windows\system32\pifmgr.dll (old-style icons of Windows 95 vintage)
o C:\windows\system32\inetcpl.cpl (old-style icons of Windows 95 vintage)
o C:\windows\system32\moricons.dll (old-style icons of Windows 95 vintage)
o C:\windows\system32\accessibilitycpl.dll (accessibility features icons)
o C:\windows\system32\mmcndmgr.dll (old-style computer management icons)
o C:\windows\system32\mmres.dll (audio speakers, headphones, microphones)
o C:\windows\system32\networkexplorer.dll (network connections & hardware)
o C:\windows\system32\netcenter.dll (network settings and features)
o C:\windows\system32\netshell.dll (network connections & hardware)
o C:\windows\system32\twinui.dll (twin screens icons)
o C:\windows\system32\mspaint.exe (paint-related icons)
o C:\windows\explorer.exe (file explorer icons)
o C:\windows\system32\gameux.dll (gaming icons)
etc.

Or one can choose from a plethora of ready-made icon packs on the net, e.g.,
o <https://sourceforge.net/projects/openiconlibrary/>
o <https://www.iconfinder.com/icons/43549/folder_private_icon>
o <https://all-free-download.com/free-icon/windows-icons-pack.html>
etc.

Or, one can convert any uploaded image to an icon via online converters:
o <https://icoconvert.com/>
o <https://online-converting.com/image/png-ico/>
o <https://www.coolutils.com/online/Image-Converter/>
etc.

And, of course, there are purposefully built tools for this task:
o FxICO trialware <https://icofx.ro/>
o Greenfish freeware <http://www.greenfishsoftware.org/gfie.php>
o FolderMarker freeware <http://foldermarker.com/FolderMarker_Free.exe>
etc.
============================================================================
============================================================================
--
Usenet is a Potluck Picnic where I try to add items of value for all.

Arlen Holder

unread,
Jun 16, 2020, 8:51:30 PM6/16/20
to
UPDATE:

Usenet is a wonderful public web-searchable archive of useful tutorials,
some of which that are related to editing of icons on Windows are below.

As always, please improve such that all benefit from every thread.

Modifying an existing Windows icon with freeware:
o <https://i.postimg.cc/hPTCzbtc/icon08.jpg>
o <https://i.postimg.cc/HnrdTvww/icon07.jpg>
o <https://i.postimg.cc/SNJgdfKB/icon05.jpg>
o <https://i.postimg.cc/NFhjn4cd/icon04.jpg>
o <https://i.postimg.cc/76ZvXJdf/icon03.jpg>
o <https://i.postimg.cc/X7VKMQGM/icon02.jpg>
o <https://i.postimg.cc/43GKMY2Z/icon01.jpg>

Creating your own icons from screenshots & images:
o <https://i.postimg.cc/cHVqvPPb/icon03.jpg>
o <https://i.postimg.cc/3N7ZdRSb/icon02.jpg>
o <https://i.postimg.cc/vHc2THz3/icon01.jpg>

Related tutorials:
o *Tutorial for modifying icons inside common Windows system DLLs*
<https://groups.google.com/forum/#!topic/rec.photo.digital/lAJV8OZdZjg>

o *Tutorial for creating custom Windows icons from screenshots*
<https://groups.google.com/d/msg/microsoft.public.windowsxp.general/xm6aHzaC-D8/uD1PLfk6DAAJ>

o *Tutorial with details to properly set {batch,shortcut,target} icons*
<https://groups.google.com/d/msg/alt.msdos.batch/ndNW-4oDewY/iQzDf15OBQAJ>

o *Tutorial to find all icons hidden inside common Windows executables & DLLs*
<https://groups.google.com/d/msg/microsoft.public.windowsxp.general/-1nQdP8E_Yc/VILrouTSBAAJ>

o *Where to find thousands of free open source mobile device related icons*
<https://groups.google.com/forum/#!topic/alt.comp.freeware/0lQELGmVc0U>

o *Examples of custom icons used for various Windows shutdown shortcuts*
<https://groups.google.com/d/msg/alt.msdos.batch/ndNW-4oDewY/siPvrsBVBQAJ>

o *Tutorial to get batch command shortcuts working perfectly on Windows*
<https://groups.google.com/d/msg/microsoft.public.windowsxp.general/1PzeGP4KMTU/tTbcd9zxAAAJ>

o *Here are over 250 Win+R > Run commands to set your shortcut TARGET to*
<https://groups.google.com/d/msg/microsoft.public.windowsxp.general/cc1lGn3ty0E/DH_FxVCjAAAJ>

o *The unintuitive syntax to set a shortcut TARGET line to multiple commands*
<https://groups.google.com/d/msg/alt.msdos.batch/azQbz6D_v0Y/zwvOqeCmEAAJ>

o *What useful Windows shortcuts would you like to share with users?*
<https://groups.google.com/d/msg/microsoft.public.windowsxp.general/80ZHKKFom0c/RN3V0Av6BQAJ>

o *Quick tutorial for creating easy (Start > Run) access to lookup files on Windows*
<https://groups.google.com/d/msg/microsoft.public.windowsxp.general/5LxGOixwwWs/q8wVoJ3mBAAJ>

o *Tutorial for setting up a well-organized consistent efficient Windows menu system*
<https://groups.google.com/d/msg/microsoft.public.windowsxp.general/eWU-jOkFRtU/lkVU8yolBQAJ>

o *Shortcuts with special icons to shutdown & reboot Windows on command*
<https://groups.google.com/d/msg/alt.msdos.batch/ndNW-4oDewY/siPvrsBVBQAJ>
etc.
--
Every thread to Usenet archives should help someone now & in the future.

Arlen Holder

unread,
Aug 9, 2020, 8:26:28 AM8/9/20
to
UPDATE:

We all do essentially the same things on all operating systems (except on
iOS simply because you just can't), where I just now wrote up a nascent
tutorial for doing on Android what we habitually do on Windows - which is
organize the way we want our interface to be organized...

o Tutorial: How to easily change Android app shortcut icons & app names [sans root]
<https://groups.google.com/forum/#!topic/comp.mobile.android/3bu27OTTdGY>

In that tutorial, I walk the user through the change of app icons and app
names in three different ways, any one of which only takes seconds to do:
<https://i.postimg.cc/X7T7DX9H/icon04.jpg>
<https://i.postimg.cc/760FbPgP/icon03.jpg>
<https://i.postimg.cc/284sC5C0/icon02.jpg>
<https://i.postimg.cc/59PS5qWM/icon01.jpg>

Arlen Holder

unread,
Dec 5, 2020, 9:43:43 AM12/5/20
to
UPDATE:

If you're interested in seamless cross-platform icons on Windows & Android:

I just updated the tutorial showing how to use Windows icons on Android:
o Quick tutorial for creating Android homescreen shortcuts using custom icons
<https://groups.google.com/g/comp.mobile.android/c/if4FD2NFEnk>

I show how to instantly create shortcuts to web pages, files, folders, etc,
o Then I set custom icons from Windows & elsewhere for those shortcuts.

It's essentially exactly the same process on Android as it was on Windows!
o So all your knowledge % tools are instantly leveraged to both platforms.

It takes about two minutes from scratch, it's that easy cross platform:
1. Snap any screenshot on Windows & edit as desired at the desired size
2. Save as a square PNG with a transparent background, if desired
3. Copy over to Android & set any Android shortcut to your Windows icon

It's even quicker than two minutes if you download the Windows icons
1. Download any Windows icon from any repository you like, e.g., I used...
2. <https://www.iconarchive.com/show/sleek-xp-software-icons-by-hopstarter/Windows-Turn-Off-icon.html>
3. That Windows icon PNG became my Android "kill -9" shortcut icon.

If you use existing icons on Android, it takes about half a minute:
1. Extract any icon you want from any Android app on your device
2. Or obtain bajillions of customized icons in various icon packs
3. Then simply create a File/Folder/URL/Setting shortcut & set the icon

Here are screenshots for those who do the same things on all platforms.
o <https://i.postimg.cc/KzrX0Kdw/shortcut01.jpg> Custom shortcut icons
o <https://i.postimg.cc/RFs4CPxv/shortcut02.jpg> Creating URL shortcuts
o <https://i.postimg.cc/J4WzDQKc/shortcut03.jpg> Creating FOLDER shortcuts
o <https://i.postimg.cc/MKmPDnKC/shortcut04.jpg> Editing shortcut icons
o <https://i.postimg.cc/13RWYy8f/shortcut05.jpg> Choosing custom icons
o <https://i.postimg.cc/N0SpMTpH/shortcut06.jpg> Squaring the custom icon
o <https://i.postimg.cc/DybJkMNF/shortcut07.jpg> Finding icons to extract
o <https://i.postimg.cc/fRn3wv4d/shortcut08.jpg> Extracting icons to PNG
o <https://i.postimg.cc/GhQcYjVV/shortcut09.jpg> Net icon, before & after
o <https://i.postimg.cc/43KZDRyR/shortcut10.jpg> Copy net icon to Android
o <https://i.postimg.cc/JzFCcYq6/shortcut11.jpg> Select & edit custom icon
o <https://i.postimg.cc/c4brT9qq/shortcut12.jpg> Windows screenshot icon
o <https://i.postimg.cc/50b0jDzz/shortcut13.jpg> Windows icon on Android

See also:
o How to set a shortcut to any settings in System or in any application
<https://groups.google.com/g/comp.mobile.android/c/_1oTdgCIpkc>

o How to create a custom "kill -9" shortcut to kill background jobs
<https://groups.google.com/g/comp.mobile.android/c/Did0Rd3mRmo>

o Have you been successful creating symbolic links on your Android phone?
<https://groups.google.com/g/comp.mobile.android/c/RrRbZytwwGM>
--
I update threads so that they serve as a single-source quickref for others.
0 new messages