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

Can Irfanview alone make a transparent background of a multi-color background?

23 views
Skip to first unread message

arlen holder

unread,
Apr 21, 2019, 2:21:47 AM4/21/19
to
Can Irfanview freeware alone make a transparent background of a multi-color background?

Using _only_ Irfanview freeware and nothing else, is it possible to remove
the paint.net step in the tutorial below for creating a shortcut icon from
any arbitrary screenshot which usually does NOT have a single-color
background to set to be transparent?

============================================================================
o Find or create a shortcut that you'd like to change the icon for.

As an example, create a shortcut with the Veracrypt target shown below:
Shortcut Name: dismount.lnk
Shortcut Target = C:\apps\encrypt\VeraCrypt.exe /dismount /force
============================================================================
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 tells you your "Shell Icon Size" should be a 32x32 pixels.
============================================================================
o Screenshot any desired image (which will likely have an "uneven" background):

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

Crop with Irfanview control+y & closecrop with shift+control+y.
Save with control+s to a png file.
(For example, save as "original_icon_bank01.png")

NOTE: Since the background is uneven, it won't be wholly transparent.
============================================================================
o Set the background to be wholly transparent:

Open the file in Paint.NET
Create an ellipse selection circle around the foreground image.
Crop to that ellipse using control+shift+x.
Save with control+s to a png file.
(For example, save as "original_icon_bank01.png")

NOTE: The background is wholly transparent outside the ellipse select.
============================================================================
o Convert the PNG file to an ICO file:
Open the png file in Irfanview and save as an ICO file.

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

In summary, the goal of this thread is to eliminate the Paint.NET step above.
o Can Irfanview freeware alone make a transparent background of a multi-color background?

--
Note: I'm well aware of greenfish icon editor, icofx, icoconvert,
foldermarket, ImageMagick, Gimp, photoshop, etc., and I'm very well aware
of the thousands of downloadable icon packages, and I'm also well aware of
the 16 main locations for icons in the Windows folders and I'm aware of
online icon creation web pages, etc., ... but the goal here is to write a
tutorial to help people create any desired icon from any screenshot which
will likely have an uneven background, all using _only_ Irfanview freeware
(if that is possible).

Jim

unread,
Apr 21, 2019, 4:04:54 AM4/21/19
to
arlen holder wrote:

> Can Irfanview freeware alone make a transparent background of a multi-color background?
>
> Using _only_ Irfanview freeware and nothing else, is it possible to remove
> the paint.net step in the tutorial below for creating a shortcut icon from
> any arbitrary screenshot which usually does NOT have a single-color
> background to set to be transparent?

Yes, IrfanView alone can make a transparent background of a multi-color
background.

o IrfanView can only make 0% or 100% transparency, not alpha
transparency. (After your background is 100% transparent,
it will no longer have multi-colors.)
o With only 0% or 100% transparency, the edges of your shape
may look jagged and not smooth. To get a smooth edge, use
paint.net.
o IrfanView cannot crop to an ellipse like your paint.net step
does. To crop to an ellipse, use paint.net.
o IrfanView's transparency works like the internals of the GIF
file format. You first fill the background area with a
single color, and then set that color to be the "transparent"
color for the image.

> o Set the background to be wholly transparent:
>
> Open the file in Paint.NET
> Create an ellipse selection circle around the foreground image.
> Crop to that ellipse using control+shift+x.


[Followup-To set to alt.comp.freeware to reduce SBI|BI3 index of ECP]

arlen holder

unread,
Apr 21, 2019, 10:46:40 PM4/21/19
to
On Sun, 21 Apr 2019 00:04:48 -0800, Jim wrote:

> Yes, IrfanView alone can make a transparent background of a multi-color
> background.

Hi Jim,
Thank you for explaining how Irfanview, alone, can make the background
transparent in the sample image (which was the actual image I was working
with).

It was easy to make the background transparent in Paint.NET, but I love
simplicity of the combination of free tools, where I was trying to do it
all done in _only_ Irfanview, since you need Irfanview anyway, to save the
PNG file as an ICO file.

A. Snapshot the image using Irfanview
B. Set the background transparent, resize, & save as an ICO file in IV
C. Apply that icon to any desired shortcut in Windows

To that end, I tested your purposefully helpful suggestion on the sample
file, where I see exactly what you mean by the jagged edges.

I worked around that using a variety of software, so, in the end, I would
say that Irfanview "can" do the whole set of tasks, but, depending on the
screenshot, Irfanview results might be jagged (although we're talking
about, in the end, a 32x32 pixel image, so, it may almost never matter).

Since Usenet is a Potluck Picnic, of sorts, where everyone should bring
value to the table, what I will do to follow up on your added value, is
rewrite the tutorial to add the steps you suggested.

That way everyone can review it for accuracy, add further value, and
benefit from the results.

I'll post that tutorial to the original groups as an UPDATE, which is
the proper way to update everyone, IMHO, who finds this thread in the
future using the traditional archival search methods:
<http://tinyurl.com/alt-comp-freeware>
<http://tinyurl.com/rec-photo-digital>
<http://alt.windows7.general.narkive.com>
etc.

Thanks for your help, and especially thanks for not making jokes or
otherwise wasting everyone's time which many people do on Usenet.
0 new messages