IconExtractor.dll
1.0.2.1-beta
dotnet add package IconExtractor.dll --version 1.0.2.1-beta
NuGet\Install-Package IconExtractor.dll -Version 1.0.2.1-beta
<PackageReference Include="IconExtractor.dll" Version="1.0.2.1-beta" />
paket add IconExtractor.dll --version 1.0.2.1-beta
#r "nuget: IconExtractor.dll, 1.0.2.1-beta"
// Install IconExtractor.dll as a Cake Addin #addin nuget:?package=IconExtractor.dll&version=1.0.2.1-beta&prerelease // Install IconExtractor.dll as a Cake Tool #tool nuget:?package=IconExtractor.dll&version=1.0.2.1-beta&prerelease
IconExtractor (Beta)
Icon Extractor Library for .NET
http://www.codeproject.com/Articles/26824/Extract-icons-from-EXE-or-DLL-files
Extract all the variations of an icon from .DLL/.EXE, including the ones ExtractIconEx()
can't extract.
The beta version supports SourceLink
Usage
First, add a reference to IconExtractor.dll
to your .NET project. Then...
using System;
using System.Drawing;
using TsudaKageyu;
// -----------------------------------------------------------------------------
// Usage of IconExtractor class:
// Construct an IconExtractor object with a file.
IconExtractor ie = new IconExtractor(@"D:\sample.exe");
// Get the full name of the associated file.
string fileName = ie.FileName;
// Get the count of icons in the associated file.
int iconCount = ie.Count;
// Extract icons individually.
Icon icon0 = ie.GetIcon(0);
Icon icon1 = ie.GetIcon(1);
// Save icons individually.
using (var fs = File.OpenWrite(@"D:\sample0.ico"))
{
ie.Save(0, fs);
}
// Extract all the icons in one go.
Icon[] allIcons = ie.GetAllIcons();
// -----------------------------------------------------------------------------
// Usage of IconUtil class:
// Split the variations of icon0 into separate icon objects.
Icon[] splitIcons = IconUtil.SplitIcon(icon0);
// Convert an icon into bitmap. Unlike Icon.ToBitmap() it preserves the transparency.
Bitmap bitmap = IconUtil.ToBitmap(splitIcon[1]);
// Get the bit count of an icon.
int bitCount = IconUtil.GetBitCount(splitIcon[2]);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Microsoft.Build.Tasks.Git (>= 1.0.0-beta2-19367-01)
- Microsoft.SourceLink.Common (>= 1.0.0-beta2-19367-01)
- Microsoft.SourceLink.GitHub (>= 1.0.0-beta2-19367-01)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on IconExtractor.dll:
Repository | Stars |
---|---|
terrymacdonald/DisplayMagician
DisplayMagician is an open source tool for automatically configuring your displays and sound for a game or application from a single Windows Shortcut.
|
Version | Downloads | Last updated | |
---|---|---|---|
1.0.2.1-beta | 1,250 | 10/21/2019 | |
1.0.2 | 1,221 | 10/21/2019 | |
1.0.1 | 616 | 5/31/2019 |
System requirements:
.NET Framework version: 4.0
OS: Windows
New in this version:
Supports .NET 4.0
Project link: https://wincopies.com/
License link: https://github.com/pierresprim/IconExtractor/blob/master/LICENSE.txt