Skip to content

Commit

Permalink
Update Sample 05 (Working with pixels) to .NET Core 2.1 / 4.7.2
Browse files Browse the repository at this point in the history
(issue #8)
  • Loading branch information
LordBenjamin committed Jan 17, 2019
1 parent 2321e3d commit a6e0585
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 219 deletions.
17 changes: 7 additions & 10 deletions src/Samples/Sample 05 - Working with pixels/Program.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
using System;
using FreeImageAPI;
using System.Drawing;
using FreeImageNETUnitTest;

namespace Sample05
{
class Program
class Program
{
static void Main(string[] args)
{
// Check if FreeImage.dll is available (can be in %path%).
if (!FreeImage.IsAvailable())
{
Console.WriteLine("FreeImage.dll seems to be missing. Aborting.");
return;
}

Sample sample = new Sample();
NativeLibraryLoader.CopyFreeImageNativeDll();
FreeImage.ValidateAvailability();

Sample sample = new Sample();

// The example will flip the bitmap by manually accessing the
// bitmaps scanlines and swapping them
Expand Down Expand Up @@ -210,4 +207,4 @@ public void Example03()
}
}
}
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,105 +1,33 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A501F134-8FB6-460B-AFE9-884A696C1C07}</ProjectGuid>
<AssemblyTitle>Sample03</AssemblyTitle>
<TargetFrameworks>netcoreapp2.1;net472</TargetFrameworks>
<ApplicationIcon />
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sample05</RootNamespace>
<AssemblyName>Sample05</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<StartupObject />
<AssemblyName>Sample03</AssemblyName>
<RootNamespace>Sample03</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\..\UnitTest\NativeLibraryLoader.cs" Link="NativeLibraryLoader.cs" />
</ItemGroup>

<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<ProjectReference Include="..\..\FreeImage.Standard\FreeImage.Standard.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="Sample.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Sample.tif">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Library\Library.csproj">
<Project>{6598A7CD-8F27-4D3F-A675-5AE63113A7C3}</Project>
<Name>Library</Name>
</ProjectReference>
<None Update="Sample.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Sample.tif">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample 05 - Working with pixels", "Sample 05 - Working with pixels.csproj", "{1CC93412-5D72-4BF4-8AF0-1D6BF97202B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeImage.Standard", "..\..\FreeImage.Standard\FreeImage.Standard.csproj", "{687D1D9A-B67F-4898-AE57-943FFFEC761F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1CC93412-5D72-4BF4-8AF0-1D6BF97202B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1CC93412-5D72-4BF4-8AF0-1D6BF97202B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CC93412-5D72-4BF4-8AF0-1D6BF97202B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1CC93412-5D72-4BF4-8AF0-1D6BF97202B5}.Release|Any CPU.Build.0 = Release|Any CPU
{687D1D9A-B67F-4898-AE57-943FFFEC761F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{687D1D9A-B67F-4898-AE57-943FFFEC761F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{687D1D9A-B67F-4898-AE57-943FFFEC761F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{687D1D9A-B67F-4898-AE57-943FFFEC761F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {487866D4-8B62-4123-BCAC-153B40CAAD1D}
EndGlobalSection
EndGlobal

0 comments on commit a6e0585

Please sign in to comment.