Browse Source

basic fixes after rebase + temporarily comment out target frameworks

af/merge-core
Anton Firszov 7 years ago
parent
commit
1978731ac1
  1. 8
      src/ImageSharp/Formats/PixelTypeInfo.cs
  2. 2
      src/ImageSharp/Image.Decode.cs
  3. 2
      src/ImageSharp/Image.FromBytes.cs
  4. 2
      src/ImageSharp/Image.FromFile.cs
  5. 2
      src/ImageSharp/Image.FromStream.cs
  6. 2
      src/ImageSharp/Image.LoadPixelData.cs
  7. 2
      src/ImageSharp/Image.WrapMemory.cs
  8. 5
      src/ImageSharp/ImageSharp.csproj
  9. 6
      src/ImageSharp/Image{TPixel}.cs

8
src/ImageSharp/Formats/PixelTypeInfo.cs

@ -1,6 +1,10 @@
// Copyright (c) Six Labors and contributors. // Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats namespace SixLabors.ImageSharp.Formats
{ {
/// <summary> /// <summary>
@ -21,5 +25,9 @@ namespace SixLabors.ImageSharp.Formats
/// Gets color depth, in number of bits per pixel. /// Gets color depth, in number of bits per pixel.
/// </summary> /// </summary>
public int BitsPerPixel { get; } public int BitsPerPixel { get; }
internal static PixelTypeInfo Create<TPixel>()
where TPixel : struct, IPixel<TPixel> =>
new PixelTypeInfo(Unsafe.SizeOf<TPixel>() * 8);
} }
} }

2
src/ImageSharp/Image.Decode.cs

@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp
/// <content> /// <content>
/// Adds static methods allowing the decoding of new images. /// Adds static methods allowing the decoding of new images.
/// </content> /// </content>
public static partial class Image public abstract partial class Image
{ {
/// <summary> /// <summary>
/// Creates an <see cref="Image{TPixel}"/> instance backed by an uninitialized memory buffer. /// Creates an <see cref="Image{TPixel}"/> instance backed by an uninitialized memory buffer.

2
src/ImageSharp/Image.FromBytes.cs

@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp
/// <content> /// <content>
/// Adds static methods allowing the creation of new image from a byte array. /// Adds static methods allowing the creation of new image from a byte array.
/// </content> /// </content>
public static partial class Image public abstract partial class Image
{ {
/// <summary> /// <summary>
/// By reading the header on the provided byte array this calculates the images format. /// By reading the header on the provided byte array this calculates the images format.

2
src/ImageSharp/Image.FromFile.cs

@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp
/// <content> /// <content>
/// Adds static methods allowing the creation of new image from a given file. /// Adds static methods allowing the creation of new image from a given file.
/// </content> /// </content>
public static partial class Image public abstract partial class Image
{ {
/// <summary> /// <summary>
/// By reading the header on the provided file this calculates the images mime type. /// By reading the header on the provided file this calculates the images mime type.

2
src/ImageSharp/Image.FromStream.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp
/// <content> /// <content>
/// Adds static methods allowing the creation of new image from a given stream. /// Adds static methods allowing the creation of new image from a given stream.
/// </content> /// </content>
public static partial class Image public abstract partial class Image
{ {
/// <summary> /// <summary>
/// By reading the header on the provided stream this calculates the images mime type. /// By reading the header on the provided stream this calculates the images mime type.

2
src/ImageSharp/Image.LoadPixelData.cs

@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp
/// <content> /// <content>
/// Adds static methods allowing the creation of new image from raw pixel data. /// Adds static methods allowing the creation of new image from raw pixel data.
/// </content> /// </content>
public static partial class Image public abstract partial class Image
{ {
/// <summary> /// <summary>
/// Create a new instance of the <see cref="Image{TPixel}"/> class from the raw <typeparamref name="TPixel"/> data. /// Create a new instance of the <see cref="Image{TPixel}"/> class from the raw <typeparamref name="TPixel"/> data.

2
src/ImageSharp/Image.WrapMemory.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp
/// <content> /// <content>
/// Adds static methods allowing wrapping an existing memory area as an image. /// Adds static methods allowing wrapping an existing memory area as an image.
/// </content> /// </content>
public static partial class Image public abstract partial class Image
{ {
/// <summary> /// <summary>
/// Wraps an existing contiguous memory area of 'width' x 'height' pixels, /// Wraps an existing contiguous memory area of 'width' x 'height' pixels,

5
src/ImageSharp/ImageSharp.csproj

@ -10,7 +10,10 @@
<VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix> <VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix>
<VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix> <VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix>
<TargetFrameworks>netcoreapp2.1;netstandard1.3;netstandard2.0;net472</TargetFrameworks>
<!--<TargetFrameworks>netcoreapp2.1;netstandard1.3;netstandard2.0;net472</TargetFrameworks>-->
<TargetFramework>netcoreapp2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>SixLabors.ImageSharp</AssemblyName> <AssemblyName>SixLabors.ImageSharp</AssemblyName>

6
src/ImageSharp/Image{TPixel}.cs

@ -128,10 +128,10 @@ namespace SixLabors.ImageSharp
public PixelTypeInfo PixelType { get; } public PixelTypeInfo PixelType { get; }
/// <inheritdoc/> /// <inheritdoc/>
public int Width => this.Frames.RootFrame.Width; public override int Width => this.Frames.RootFrame.Width;
/// <inheritdoc/> /// <inheritdoc/>
public int Height => this.Frames.RootFrame.Height; public override int Height => this.Frames.RootFrame.Height;
/// <inheritdoc/> /// <inheritdoc/>
public ImageMetadata Metadata { get; } public ImageMetadata Metadata { get; }
@ -197,7 +197,7 @@ namespace SixLabors.ImageSharp
} }
/// <inheritdoc/> /// <inheritdoc/>
public void Dispose() => this.Frames.Dispose(); public override void Dispose() => this.Frames.Dispose();
internal override void AcceptVisitor(IImageVisitor visitor) internal override void AcceptVisitor(IImageVisitor visitor)
{ {

Loading…
Cancel
Save