-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Works great.
- Loading branch information
Showing
36 changed files
with
7,209 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.24720.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageEnlarger", "ImageEnlarger\ImageEnlarger.csproj", "{77D1D2B3-367E-421D-BA6C-13EB826AA747}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{77D1D2B3-367E-421D-BA6C-13EB826AA747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{77D1D2B3-367E-421D-BA6C-13EB826AA747}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{77D1D2B3-367E-421D-BA6C-13EB826AA747}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{77D1D2B3-367E-421D-BA6C-13EB826AA747}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{77D1D2B3-367E-421D-BA6C-13EB826AA747}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>ImageEnlarger</RootNamespace> | ||
<AssemblyName>ImageEnlarger</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Drawing; | ||
using System.Drawing.Drawing2D; | ||
using System.Drawing.Imaging; | ||
|
||
namespace ImageEnlarger | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Console.WriteLine("Enter the full file path of your Eclipse configuration file:\n"); | ||
var dir = @Console.ReadLine(); | ||
var ext = new List<string> { ".jpg", ".gif", ".png" }; | ||
var myFiles = Directory.GetFiles(dir, "*.*", SearchOption.AllDirectories) | ||
.Where(s => ext.Any(e => s.EndsWith(e))).ToList<string>(); | ||
|
||
int height, width; | ||
try { | ||
Console.WriteLine("Enter Resize Height\t"); | ||
height = int.Parse(Console.ReadLine()); | ||
Console.WriteLine("Enter Resize Width\t"); | ||
width = int.Parse(Console.ReadLine()); | ||
} | ||
catch | ||
{ | ||
Console.WriteLine("You must enter a valid integer for Height and Width"); | ||
Console.ReadLine(); | ||
return; | ||
} | ||
int count = 1; | ||
List<string> missed = new List<string>(); | ||
foreach (string file in myFiles) | ||
{ | ||
Console.Clear(); | ||
Console.Write((((double)count++ / (double)myFiles.Count())*100).ToString("##.##") + "%"); | ||
try | ||
{ | ||
using (FileStream bitmapFile = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) | ||
{ | ||
Image loaded = new Bitmap(bitmapFile); | ||
Bitmap b = ResizeImage(loaded, height, width); | ||
b.Save("temp"); | ||
} | ||
|
||
File.Delete(file); | ||
|
||
using (Image i = Bitmap.FromFile("temp")) | ||
{ | ||
i.Save(file); | ||
} | ||
|
||
File.Delete("temp"); | ||
} | ||
catch { missed.Add(file); } | ||
} | ||
Console.WriteLine("\nError resizing:\n"); | ||
Console.WriteLine(string.Join("\n", missed)); | ||
Console.ReadLine(); | ||
} | ||
/// <summary> | ||
/// Resize the image to the specified width and height. | ||
/// </summary> | ||
/// <param name="image">The image to resize.</param> | ||
/// <param name="width">The width to resize to.</param> | ||
/// <param name="height">The height to resize to.</param> | ||
/// <returns>The resized image.</returns> | ||
public static Bitmap ResizeImage(Image image, int width, int height) | ||
{ | ||
var destRect = new Rectangle(0, 0, width, height); | ||
var destImage = new Bitmap(width, height); | ||
|
||
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); | ||
|
||
using (var graphics = Graphics.FromImage(destImage)) | ||
{ | ||
graphics.CompositingMode = CompositingMode.SourceCopy; | ||
graphics.CompositingQuality = CompositingQuality.HighQuality; | ||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; | ||
graphics.SmoothingMode = SmoothingMode.HighQuality; | ||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; | ||
|
||
using (var wrapMode = new ImageAttributes()) | ||
{ | ||
wrapMode.SetWrapMode(WrapMode.TileFlipXY); | ||
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode); | ||
} | ||
} | ||
|
||
return destImage; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("ImageEnlarger")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("ImageEnlarger")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("77d1d2b3-367e-421d-ba6c-13eb826aa747")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
</configuration> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> | ||
<security> | ||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
</assembly> |
Binary file added
BIN
+7.09 KB
ImageEnlarger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
9 changes: 9 additions & 0 deletions
9
ImageEnlarger/obj/Debug/ImageEnlarger.csproj.FileListAbsolute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\bin\Debug\ImageEnlarger.exe.config | ||
c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\obj\Debug\ImageEnlarger.csprojResolveAssemblyReference.cache | ||
c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\bin\Debug\ImageEnlarger.exe | ||
c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\bin\Debug\ImageEnlarger.pdb | ||
c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\obj\Debug\ImageEnlarger.exe | ||
c:\users\mahowa\documents\visual studio 2015\Projects\ImageEnlarger\ImageEnlarger\obj\Debug\ImageEnlarger.pdb | ||
C:\Users\mahowa\Documents\Visual Studio 2015\Projects\ImageEnlarger\ImageUpscaler\ImageEnlarger\bin\Debug\ImageEnlarger.exe.config | ||
C:\Users\mahowa\Documents\Visual Studio 2015\Projects\ImageEnlarger\ImageUpscaler\ImageEnlarger\obj\Debug\ImageEnlarger.exe | ||
C:\Users\mahowa\Documents\Visual Studio 2015\Projects\ImageEnlarger\ImageUpscaler\ImageEnlarger\obj\Debug\ImageEnlarger.pdb |
Binary file added
BIN
+20.8 KB
ImageEnlarger/obj/Debug/ImageEnlarger.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="ImageResizer" version="4.0.5" targetFramework="net452" /> | ||
<package id="ImageResizer.MvcWebConfig" version="4.0.5" targetFramework="net452" /> | ||
<package id="ImageResizer.Plugins.DiskCache" version="4.0.5" targetFramework="net452" /> | ||
<package id="ImageResizer.Plugins.PrettyGifs" version="4.0.5" targetFramework="net452" /> | ||
<package id="ImageResizer.WebConfig" version="4.0.5" targetFramework="net452" /> | ||
</packages> |
Binary file not shown.
Oops, something went wrong.