Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/FreeImage-dotnet-core/Classes/FreeImageBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
using System.Diagnostics;
using System.Reflection;

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP
using System.Runtime.Serialization;
#endif

Expand All @@ -54,7 +54,7 @@ namespace FreeImageAPI
/// <summary>
/// Encapsulates a FreeImage-bitmap.
/// </summary>
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP
[Serializable, Guid("64a4c935-b757-499c-ab8c-6110316a9e51")]
public class FreeImageBitmap : MarshalByRefObject, ICloneable, IDisposable, IEnumerable, ISerializable
#else
Expand Down Expand Up @@ -234,7 +234,7 @@ public FreeImageBitmap(FreeImageBitmap original, int width, int height)
AddMemoryPressure();
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Initializes a new instance of the <see cref="FreeImageBitmap"/> class
Expand Down Expand Up @@ -610,7 +610,7 @@ public FreeImageBitmap(Type type, string resource)
{
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Initializes a new instance of the <see cref="FreeImageBitmap"/> class bases on the specified size
Expand Down Expand Up @@ -921,7 +921,7 @@ public FreeImageBitmap(int width, int height, int stride, int bpp, FREE_IMAGE_TY
AddMemoryPressure();
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Initializes a new instance of the <see cref="FreeImageBitmap"/> class.
Expand Down Expand Up @@ -967,7 +967,7 @@ public FreeImageBitmap(SerializationInfo info, StreamingContext context)

#region Operators

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Converts a <see cref="FreeImageBitmap"/> instance to a <see cref="Bitmap"/> instance.
Expand Down Expand Up @@ -1835,7 +1835,7 @@ public FreeImageBitmap GetThumbnailImage(int maxPixelSize, bool convert)
return result;
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Converts this <see cref="FreeImageBitmap"/> instance to a <see cref="Bitmap"/> instance.
Expand Down Expand Up @@ -2557,7 +2557,7 @@ public void SelectActiveFrame(int frameIndex)
}
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Creates a GDI bitmap object from this <see cref="FreeImageBitmap"/>.
Expand Down Expand Up @@ -2726,7 +2726,7 @@ public void SetResolution(float xDpi, float yDpi)
FreeImage.SetResolutionY(dib, (uint)yDpi);
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// This function is not yet implemented.
Expand Down Expand Up @@ -3771,7 +3771,7 @@ public override int GetHashCode()

#region Static functions

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Returns a value that indicates whether the pixel format for this <see cref="FreeImageBitmap"/> contains alpha information.
Expand Down Expand Up @@ -3857,7 +3857,7 @@ public static FreeImageBitmap FromFile(string filename, bool useEmbeddedColorMan
return new FreeImageBitmap(filename);
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Creates a <see cref="FreeImageBitmap"/> from a handle to a GDI bitmap.
Expand Down Expand Up @@ -3931,7 +3931,7 @@ public static FreeImageBitmap FromStream(Stream stream, bool useEmbeddedColorMan
return new FreeImageBitmap(stream);
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

/// <summary>
/// Returns the color depth, in number of bits per pixel,
Expand Down Expand Up @@ -4327,7 +4327,7 @@ private void LoadFromStream(Stream stream, FREE_IMAGE_FORMAT format, FREE_IMAGE_
/// <summary>
/// Helper class to store informations for <see cref="FreeImageBitmap.SaveAdd()"/>.
/// </summary>
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP
private sealed class SaveInformation : ICloneable
#else
private sealed class SaveInformation
Expand Down Expand Up @@ -4420,7 +4420,7 @@ IEnumerator IEnumerable.GetEnumerator()
return GetScanlines().GetEnumerator();
}

#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20
#if NET462 || NET461 || NET46 || NET452 || NET451 || NET45 || NET40 || NET35 || NET20 || NETCOREAPP

void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
Expand Down
6 changes: 5 additions & 1 deletion src/FreeImage-dotnet-core/FreeImage-dotnet-core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>FreeImage dotnet core</AssemblyTitle>
<VersionPrefix>4.3.6</VersionPrefix>
<Authors></Authors>
<TargetFrameworks>netstandard2.0;netstandard1.6;netstandard1.5;netstandard1.4;netstandard1.3;net461;net46;net452;net451;net45;net40</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard1.6;netstandard1.5;netstandard1.4;netstandard1.3;netcoreapp3.1;net461;net46;net452;net451;net45;net40</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>FreeImage-dotnet-core</AssemblyName>
<PackageId>FreeImage-dotnet-core</PackageId>
Expand Down Expand Up @@ -59,6 +59,10 @@ This is for FreeImage version 3.17.0 (The version number of this package no long
</None>
</ItemGroup>-->

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Drawing-dotnet-core" Version="1.2.3" />
</ItemGroup>
Expand Down