ImageUtility 1.3.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ImageUtility --version 1.3.1
NuGet\Install-Package ImageUtility -Version 1.3.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ImageUtility" Version="1.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ImageUtility --version 1.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ImageUtility, 1.3.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ImageUtility as a Cake Addin #addin nuget:?package=ImageUtility&version=1.3.1 // Install ImageUtility as a Cake Tool #tool nuget:?package=ImageUtility&version=1.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
public partial class ImageUtilityTester : Form
{
public ImageUtilityTester()
{
Action<string> progress = (v) => { Console.WriteLine(v); };
//Show dialog modeless
FloatingImageViewer floatingImageViewer = new FloatingImageViewer("Image")
{
TopMost = true,
};
floatingImageViewer.ToolStripButtonPrev.Visible = floatingImageViewer.ToolStripButtonNext.Visible = false;
ListBox lb = new ListBox() { Parent = this, Dock = DockStyle.Top, Height = 300, };
lb.SelectedIndexChanged += (sender, e) =>
{
floatingImageViewer.Reset(lb.Text);
floatingImageViewer.Title = lb.Text;
};
lb.ContextMenuStrip = new ContextMenuStrip();
ToolStripMenuItem tsmiFloatingImageViewer = new ToolStripMenuItem() { Text = "Show", };
lb.ContextMenuStrip.Items.Add(tsmiFloatingImageViewer);
tsmiFloatingImageViewer.Click += (sender, e) =>
{
floatingImageViewer.Show();
};
PictureBoxEx pictureBoxEx = new PictureBoxEx(progress, 1.0)
{
Height = 400
};
Controls.Add(pictureBoxEx.Panel);
Controls.Add(pictureBoxEx.ToolStrip);
var binaryImages = new List<byte[]>();
var imageidx = 0;
var toolStripMenuItemMultipleImages = new ToolStripMenuItem() { Text = "Multiple images", };
Action resetImage = () =>
{
pictureBoxEx.ResetImage(binaryImages[imageidx]);
pictureBoxEx.ToolStripButtonPrev.Enabled = imageidx != 0;
pictureBoxEx.ToolStripButtonNext.Enabled = imageidx != binaryImages.Count - 1;
};
Action SelectFiles = () =>
{
binaryImages.Clear();
var files = ImageHelper.ShowMultipleFileSelectDialog();
foreach (var f in files)
{
using (System.IO.FileStream fs = new System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.Read))
{
var data = new byte[fs.Length];
fs.Read(data, 0, data.Length);
if (ImageHelper.IsImage(data))
{
binaryImages.Add(data);
}
}
}
};
toolStripMenuItemMultipleImages.Click += (sender, e) =>
{
SelectFiles();
if (binaryImages.Count > 0)
{
imageidx = 0;
resetImage();
}
};
pictureBoxEx.ToolStripButtonPrev.Click += (sender, e) =>
{
if (imageidx > 0)
{
imageidx--;
resetImage();
}
};
pictureBoxEx.ToolStripButtonNext.Click += (sender, e) =>
{
if (imageidx < binaryImages.Count - 1)
{
imageidx++;
resetImage();
}
};
pictureBoxEx.ToolStripMenuItemFile.DropDownItems.Add(new ToolStripSeparator());
pictureBoxEx.ToolStripMenuItemFile.DropDownItems.Add(toolStripMenuItemMultipleImages);
Controls.Add(pictureBoxEx.ToolStrip);
Controls.Add(pictureBoxEx.Menu);
var toolStripMenuItemShowImageDialog = new ToolStripMenuItem() { Text = "ImageViewer", };
pictureBoxEx.ToolStripMenuItemFile.DropDownItems.Add(new ToolStripSeparator());
pictureBoxEx.ToolStripMenuItemFile.DropDownItems.Add(toolStripMenuItemShowImageDialog);
toolStripMenuItemShowImageDialog.Click += (sender, e) =>
{
SelectFiles();
if (binaryImages.Count > 0)
{
ImageViewer.ShowDialog(binaryImages, 0.3);
}
};
var toolStripMenuItemShowImage = new ToolStripMenuItem() { Text = "FloatingImageViewer", };
pictureBoxEx.ToolStripMenuItemFile.DropDownItems.Add(toolStripMenuItemShowImage);
toolStripMenuItemShowImage.Click += (sender, e) =>
{
var files = ImageHelper.ShowMultipleFileSelectDialog();
if (files.Length > 0)
{
lb.Items.Clear();
lb.Items.AddRange(files);
if (lb.Items.Count > 0)
{
floatingImageViewer.Reset(lb.Items[0].ToString());
floatingImageViewer.Title = lb.Items[0].ToString();
}
floatingImageViewer.Show();
}
};
StartPosition = FormStartPosition.CenterScreen;
ClientSize = new Size(800, 600);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net452 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.5.7 | 73 | 10/28/2024 | |
1.5.6 | 125 | 6/10/2024 | |
1.5.5 | 122 | 6/9/2024 | |
1.5.4 | 153 | 2/4/2024 | |
1.5.3 | 112 | 1/23/2024 | |
1.5.2 | 183 | 12/30/2023 | |
1.5.1 | 152 | 12/8/2023 | |
1.5.0 | 133 | 11/27/2023 | |
1.4.6 | 253 | 4/9/2023 | |
1.4.4.1 | 317 | 12/4/2022 | |
1.4.4 | 304 | 12/4/2022 | |
1.4.3 | 313 | 11/23/2022 | |
1.4.2.4 | 319 | 11/19/2022 | |
1.4.2.3 | 348 | 11/5/2022 | |
1.4.2.2 | 335 | 11/3/2022 | |
1.4.2.1 | 365 | 10/30/2022 | |
1.4.2 | 354 | 10/29/2022 | |
1.4.1 | 396 | 9/22/2022 | |
1.4.0 | 405 | 9/10/2022 | |
1.3.9.1 | 395 | 8/28/2022 | |
1.3.9 | 443 | 7/21/2022 | |
1.3.8 | 416 | 7/19/2022 | |
1.3.7 | 442 | 7/17/2022 | |
1.3.6 | 401 | 7/7/2022 | |
1.3.5 | 439 | 6/21/2022 | |
1.3.4 | 433 | 5/22/2022 | |
1.3.2 | 450 | 3/26/2022 | |
1.3.1 | 429 | 3/20/2022 | |
1.3.0 | 424 | 3/16/2022 | |
1.2.7 | 442 | 3/15/2022 | |
1.2.6 | 425 | 3/13/2022 | |
1.2.2 | 423 | 3/6/2022 | |
1.2.1 | 430 | 3/5/2022 | |
1.2.0 | 431 | 2/8/2022 | |
1.1.9 | 430 | 2/7/2022 | |
1.1.8 | 449 | 2/6/2022 | |
1.1.7 | 445 | 1/29/2022 | |
1.1.5 | 293 | 12/14/2021 | |
1.1.4 | 288 | 12/8/2021 | |
1.1.3 | 296 | 12/7/2021 | |
1.1.1 | 325 | 11/3/2021 | |
1.0.8 | 344 | 10/20/2021 |