Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
1555f09
Begin port
JimBobSquarePants Jun 16, 2017
1abe631
Fix header finder
JimBobSquarePants Jun 18, 2017
d4d74b4
Add js source link
JimBobSquarePants Jun 18, 2017
f63f85a
Use buffer
JimBobSquarePants Jun 18, 2017
2c629c7
Remove offset
JimBobSquarePants Jun 18, 2017
b025ed6
Fix progressive bool assignment
JimBobSquarePants Jun 18, 2017
3728b82
(╯°□°)╯︵ ┻━┻
JimBobSquarePants Jun 19, 2017
0ea7a6f
Can now build huffman tables
JimBobSquarePants Jun 20, 2017
a718bf8
Begin ProcessStartOfScan
JimBobSquarePants Jun 20, 2017
cd72206
Merge branch 'master' into jpeg-port
JimBobSquarePants Jun 21, 2017
1629819
Can now decode a scan
JimBobSquarePants Jun 22, 2017
8bbc63f
Begin second phase of decoding
JimBobSquarePants Jun 22, 2017
c1025a6
Impove disposal
JimBobSquarePants Jun 23, 2017
549e61f
Experiment with new file marker finder
JimBobSquarePants Jun 23, 2017
ba8a5b3
Merge branch 'master' into jpeg-port
JimBobSquarePants Jun 23, 2017
2f501eb
Decoder now doesn't break tests
JimBobSquarePants Jun 25, 2017
4a4e94d
Fix progressive decoding
JimBobSquarePants Jun 25, 2017
472d6ba
baseline decode works progressive nearly
JimBobSquarePants Jun 26, 2017
28a8aca
Fix progressive scan decoding
JimBobSquarePants Jun 26, 2017
ca9bd35
Can now decode many images
JimBobSquarePants Jun 27, 2017
69c15e3
Merge branch 'master' into jpeg-port
JimBobSquarePants Jun 27, 2017
59c0793
Can now decode that bad progressive image
JimBobSquarePants Jun 28, 2017
827ca83
Now decodes all images
JimBobSquarePants Jun 28, 2017
e2d26eb
Fix #159
JimBobSquarePants Jun 28, 2017
76e91db
use an offset span instead of buffer
tocsoft Jun 28, 2017
db2b712
additional usages of Span
tocsoft Jun 28, 2017
5439240
fixed Sandbox46 execution
antonfirsov Jun 28, 2017
ea0abc9
Rough working better Huffman
JimBobSquarePants Jun 29, 2017
0f60242
Better Huffman decoding
JimBobSquarePants Jun 29, 2017
0323d00
Almost got Huffman LUT working
JimBobSquarePants Jun 30, 2017
a360614
Better Huffman indexing.
JimBobSquarePants Jun 30, 2017
2703e22
Merge branch 'master' into jpeg-port
JimBobSquarePants Jun 30, 2017
8241314
Getting close with that lookup now.
JimBobSquarePants Jul 1, 2017
2c64ed6
Fix build
JimBobSquarePants Jul 1, 2017
2b4abd2
introduced CoreCompat.SystemDrawing as reference utility for tests, i…
antonfirsov Jul 1, 2017
7d12830
ReferencePngDecoder
antonfirsov Jul 1, 2017
24433e9
ReferenceOutput + ResizeTests prototype
antonfirsov Jul 2, 2017
1e8f899
Merge branch 'master' into jpeg-port
JimBobSquarePants Jul 2, 2017
5086b08
Use properties
JimBobSquarePants Jul 2, 2017
290646a
store scale as vector + remove unneeded bit or operations
tocsoft Jul 2, 2017
09d8fac
refactor
antonfirsov Jul 5, 2017
738fc20
Add WIP faster IDCT method
JimBobSquarePants Jul 6, 2017
9ff1b56
This works. High allocations though
JimBobSquarePants Jul 9, 2017
8c22c11
A little cleanup
JimBobSquarePants Jul 9, 2017
a236a80
Simplify indexing
JimBobSquarePants Jul 9, 2017
1cd137d
Reduce allocations
JimBobSquarePants Jul 9, 2017
0ff77ec
Move check into if statement
JimBobSquarePants Jul 9, 2017
996da79
Fix tests
JimBobSquarePants Jul 10, 2017
215345e
Merge branch 'master' into jpeg-port
JimBobSquarePants Jul 10, 2017
3272518
Fix broken EXIF test
JimBobSquarePants Jul 10, 2017
ae6d91a
Fix ImageMetaData test
JimBobSquarePants Jul 10, 2017
4d931e6
more benchmarks
antonfirsov Jul 11, 2017
2af76f6
refactored GetFormatsDirectory() to GetInputImagesDirectoryFullPath()
antonfirsov Jul 21, 2017
7eca259
always DebugSave() png-s
antonfirsov Jul 21, 2017
0136a6c
ResizeTests working with CalliphoraPartial.png
antonfirsov Jul 28, 2017
fe874b6
Merge remote-tracking branch 'origin/master' into antonfirsov/qa-lab
antonfirsov Aug 13, 2017
572db70
build fix + clean up ImageDataAttributeBase code duplication
antonfirsov Aug 13, 2017
3251941
use TestPatternImages in ResizeTests
antonfirsov Aug 13, 2017
5dff018
moving input test images into ./tests/TestImages/Input
antonfirsov Aug 13, 2017
e170f80
update .gitignore to match the new test output directory
antonfirsov Aug 13, 2017
f53a788
test utility refactors
antonfirsov Aug 13, 2017
5fb4461
Merge remote-tracking branch 'origin/tocsoft/mutate-api' into antonfi…
antonfirsov Aug 13, 2017
355a4ac
re-apply DebugSave() changes after merging mutate-api
antonfirsov Aug 14, 2017
d855c6e
reduced resize output by 75%
antonfirsov Aug 14, 2017
f357f31
moving images again
antonfirsov Aug 14, 2017
cd2e0a1
optimized ResizeTests output further, added Bike.png
antonfirsov Aug 15, 2017
0e06480
optimized DetectEdgesTest
antonfirsov Aug 15, 2017
81ee6d0
smaller Bike.png, optimized RotateTests & RotateFlipTests
antonfirsov Aug 15, 2017
e01cc2b
docs & formatting
antonfirsov Aug 15, 2017
a00aec7
ImageComparer refactors, ExactComparer
antonfirsov Aug 15, 2017
0b0ba13
implemented ExactImageComparer
antonfirsov Aug 15, 2017
619ad53
changed ImageComparer design again
antonfirsov Aug 15, 2017
d9238a5
implemented TolerantImageComparer
antonfirsov Aug 15, 2017
f9cd6b6
replaced old comparer everywhere
antonfirsov Aug 15, 2017
8d091b5
looks like ApplyOilPaintFilterInBox() is failing with a very good reason
antonfirsov Aug 15, 2017
105d445
PixelTypes bugfix + polishing ResizeTests
antonfirsov Aug 15, 2017
985ed92
added submodule as "External"
antonfirsov Aug 15, 2017
fe79f4a
TestImageExtensionsTests + TolerantImageComparer bugfix + update subm…
antonfirsov Aug 15, 2017
2b292d4
ResizeTests use CompareToReferenceOutput now!
antonfirsov Aug 15, 2017
747aa7f
JpegDecoderTests using reference images
antonfirsov Aug 16, 2017
2c8e29c
copied pdfjs classes from the jpeg-port branch
antonfirsov Aug 16, 2017
692c4f7
prefixed every ported class with PdfJs... to avoid naming conflicts
antonfirsov Aug 16, 2017
0a80231
shut up StyleStalin, I'm working! :P
antonfirsov Aug 16, 2017
85f880d
so what's the deal with submodule branches?
antonfirsov Aug 16, 2017
f460c2a
maybe this?
antonfirsov Aug 16, 2017
a5c901f
now what?
antonfirsov Aug 16, 2017
febe9c6
TestImageProvider can use custom decoder now
antonfirsov Aug 16, 2017
cd3f391
TestImageProvider can use custom decoder now
antonfirsov Aug 16, 2017
59705ee
introducing the "doNotAppendPixelType" feature
antonfirsov Aug 16, 2017
a284598
CompareToReferenceOutput() no longer triggers DebugSave(). Need to be…
antonfirsov Aug 16, 2017
55d814c
with 'appendPixelTypeToFileName: false' there is no need to duplicate…
antonfirsov Aug 16, 2017
9af66a6
Merge remote-tracking branch 'origin/antonfirsov/qa-lab' into jpeg-lab
antonfirsov Aug 16, 2017
48f3fde
comparing decoders
antonfirsov Aug 16, 2017
58281ef
Use more accurate IDCT for now
JimBobSquarePants Aug 16, 2017
f5b9a8c
Use more accurate IDCT
JimBobSquarePants Aug 16, 2017
9da4345
.
antonfirsov Aug 17, 2017
2d80a6f
Merge branch 'jpeg-lab' of https://github.com/JimBobSquarePants/Image…
antonfirsov Aug 17, 2017
84852a8
good by GenericFactory!
antonfirsov Aug 18, 2017
1562e32
Using Corecompat.System.Drawing as reference encoder/decoder for PNG.…
antonfirsov Aug 18, 2017
02eb5f2
PngDecoder is covered now, and proven to be buggy :P
antonfirsov Aug 18, 2017
1df0010
covered DetectEdges
antonfirsov Aug 18, 2017
f6904d9
Merge remote-tracking branch 'origin/antonfirsov/qa-lab' into jpeg-lab
antonfirsov Aug 18, 2017
a103cb8
TestImageProvider.FileProvider cache is now aware of decoder parameters
antonfirsov Aug 18, 2017
a798d5a
Merge remote-tracking branch 'origin/antonfirsov/qa-lab' into jpeg-lab
antonfirsov Aug 18, 2017
385ed88
provider.GetImage(new JpegDecoder())
antonfirsov Aug 18, 2017
c4953b0
let's merge jpeg-port to have the changelog!
antonfirsov Aug 18, 2017
1959c4a
Merge remote-tracking branch 'origin/jpeg-port' into jpeg-lab
antonfirsov Aug 18, 2017
7383124
grouping files for decoders
antonfirsov Aug 18, 2017
4676d8a
moving a few more files
antonfirsov Aug 18, 2017
b6d4f35
GolangPort namespaces following folder structure
antonfirsov Aug 18, 2017
1c75403
move Block8x8F into ImageSharp.Formats.Jpeg.Common
antonfirsov Aug 18, 2017
80380d9
adjust PdfJsPort namespaces
antonfirsov Aug 18, 2017
51b430b
prefixing GolangPort stuff with Old*** #Round1
antonfirsov Aug 18, 2017
493deda
renaming is hard
antonfirsov Aug 18, 2017
b3b4827
introduced OldJpegDecoder : IImageDecoder for the GolangPort decoder
antonfirsov Aug 18, 2017
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ FakesAssemblies/

**/node_modules
**/node_modules/*
**/TestOutput
**/Images/ActualOutput
**/Images/ReferenceOutput

# ASP.NET 5
project.lock.json
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "tests/Images/External"]
path = tests/Images/External
url = https://github.com/antonfirsov/Imagesharp.Tests.Images.git
branch = jpeg-lab
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "aim+fUyx7kDQQcAYV1mX16cvyFEYsxiW3y26xjmeuKzsOf6DIUK328pE8KnO50bMWhfVPjuW7jWc43jI+nbUeIW5018aFcjoOrEK2F8JvJ0UKtEo+ONchypJSXA2TSdL0iIlufMBepsmlBsSLkCwHCJYohYcueZV0u9NVPc3n282KLL8ItRZeSFG/cL/a2yrkFnTFhq9OtkUtP4CcVE7BOtzjfftNcn4Rup73e5JkLT7L9AZS7eCYkIYV0KRlT2pOa/FuOHlfP9NP+NVtd83GXUY2FKBsmN3EmrQgGDTfwfwcJjN5dqIqzkIXmLV8IKQ3aiW2//02pIe5VrdqHQG+EVMRcdpCWyKUkMj0g4rGYkqKCtVJojKtOR93ycOGUDc6+cMMoyn3J2qFydkp278dGWeLuwtGfD25fHXorqK1aL9/bGPcwdinrBmcwnuy1IECtuTkEfAPsb6O4nArnDsTEzeQxwa/MAicmpux//TNKgkQGqzCPeHKbl4vOfyyI6kCsf8edWv8fOSPvJUGvL14+/TZ6lY8S+30fosOmwMCe7xlbtcVlBVtOsKx/XUufrP2Vuptlc8INaq6++XtgpCoMLL0SJfBFQKZRmBGavv1Ztyf0aL6Qp303HKGTyXOEq2k18iJmukB6JcnEGVsaAyteGlruQIbPgHWbxhZSoJZPw="
- secure: "rjMvEMN9rpvIXqXqCAAKzbHyABzr7E4wPU/dYJ/mHBqlCccFpQrEXVVM1MfRFXYuWZSaIioknhLATZjT5xvIYpTNM6D57z4OTmqeRHhYm80="

before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-

addons:
coverity_scan:
project:
name: "JimBobSquarePants/ImageSharp"
name: "SixLabors/ImageSharp"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "dotnet restore"
Expand Down
5 changes: 4 additions & 1 deletion ImageSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{7CC6
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvatarWithRoundedCorner", "samples\AvatarWithRoundedCorner\AvatarWithRoundedCorner.csproj", "{844FC582-4E78-4371-847D-EFD4D1103578}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChangeDefaultEncoderOptions", "samples\ChangeDefaultEncoderOptions\ChangeDefaultEncoderOptions.csproj", "{07EE511D-4BAB-4323-BAFC-3AF2BF9366F0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChangeDefaultEncoderOptions", "samples\ChangeDefaultEncoderOptions\ChangeDefaultEncoderOptions.csproj", "{07EE511D-4BAB-4323-BAFC-3AF2BF9366F0}"
EndProject
Global
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# <img src="https://github.com/raw/JimBobSquarePants/ImageSharp/master/build/icons/imagesharp-logo-256.png" alt="ImageSharp" width="52"/> ImageSharp
# <img src="https://github.com/raw/SixLabors/ImageSharp/master/build/icons/imagesharp-logo-256.png" alt="ImageSharp" width="52"/> ImageSharp

**ImageSharp** is a new, fully featured, fully managed, cross-platform, 2D graphics API designed to allow the processing of images without the use of `System.Drawing`.

Expand All @@ -9,21 +9,21 @@ Built against .Net Standard 1.1 ImageSharp can be used in device, cloud, and emb
>
> Pre-release downloads are available from the [MyGet package repository](https://www.myget.org/gallery/imagesharp).

[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://github.com/raw/JimBobSquarePants/ImageSharp/master/APACHE-2.0-LICENSE.txt)
[![GitHub issues](https://img.shields.io/github/issues/JimBobSquarePants/ImageSharp.svg)](https://github.com/JimBobSquarePants/ImageSharp/issues)
[![GitHub stars](https://img.shields.io/github/stars/JimBobSquarePants/ImageSharp.svg)](https://github.com/JimBobSquarePants/ImageSharp/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/JimBobSquarePants/ImageSharp.svg)](https://github.com/JimBobSquarePants/ImageSharp/network)
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://github.com/raw/SixLabors/ImageSharp/master/APACHE-2.0-LICENSE.txt)
[![GitHub issues](https://img.shields.io/github/issues/SixLabors/ImageSharp.svg)](https://github.com/SixLabors/ImageSharp/issues)
[![GitHub stars](https://img.shields.io/github/stars/SixLabors/ImageSharp.svg)](https://github.com/SixLabors/ImageSharp/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/SixLabors/ImageSharp.svg)](https://github.com/SixLabors/ImageSharp/network)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ImageSharp/General?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/JimBobSquarePants/ImageSharp.svg?style=social)](https://twitter.com/intent/tweet?hashtags=imagesharp,dotnet,oss&text=ImageSharp.+A+new+cross-platform+2D+graphics+API+in+C%23&url=https%3a%2f%2fgithub.com%2fJimBobSquarePants%2fImageSharp&via=james_m_south)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/SixLabors/ImageSharp.svg?style=social)](https://twitter.com/intent/tweet?hashtags=imagesharp,dotnet,oss&text=ImageSharp.+A+new+cross-platform+2D+graphics+API+in+C%23&url=https%3a%2f%2fgithub.com%2fSixLabors%2fImageSharp&via=sixlabors)
[![OpenCollective](https://opencollective.com/imagesharp/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/imagesharp/sponsors/badge.svg)](#sponsors)



| |Build Status|Code Coverage|
|-------------|:----------:|:-----------:|
|**Linux/Mac**|[![Build Status](https://travis-ci.org/JimBobSquarePants/ImageSharp.svg)](https://travis-ci.org/JimBobSquarePants/ImageSharp)|[![Code coverage](https://codecov.io/gh/JimBobSquarePants/ImageSharp/branch/master/graph/badge.svg)](https://codecov.io/gh/JimBobSquarePants/ImageSharp)|
|**Windows** |[![Build Status](https://ci.appveyor.com/api/projects/status/hu6d1gdpxdw0q360/branch/master?svg=true)](https://ci.appveyor.com/project/JamesSouth/imagesharp/branch/master)|[![Code coverage](https://codecov.io/gh/JimBobSquarePants/ImageSharp/branch/master/graph/badge.svg)](https://codecov.io/gh/JimBobSquarePants/ImageSharp)|
|**Linux/Mac**|[![Build Status](https://travis-ci.org/SixLabors/ImageSharp.svg)](https://travis-ci.org/SixLabors/ImageSharp)|[![Code coverage](https://codecov.io/gh/SixLabors/ImageSharp/branch/master/graph/badge.svg)](https://codecov.io/gh/SixLabors/ImageSharp)|
|**Windows** |[![Build Status](https://ci.appveyor.com/api/projects/status/m9pn907xdah3ca39/branch/master?svg=true)](https://ci.appveyor.com/project/six-labors/imagesharp/branch/master)|[![Code coverage](https://codecov.io/gh/SixLabors/ImageSharp/branch/master/graph/badge.svg)](https://codecov.io/gh/SixLabors/ImageSharp)|


### Installation
Expand Down Expand Up @@ -64,7 +64,7 @@ Alternatively on Linux you can use:
To clone it locally click the "Clone in Windows" button above or run the following git commands.

```bash
git clone https://github.com/JimBobSquarePants/ImageSharp
git clone https://github.com/SixLabors/ImageSharp
```

### Features
Expand Down Expand Up @@ -121,7 +121,7 @@ For optimized access within a loop it is recommended that the following methods
1. `image.GetRowSpan(y)`
2. `image.GetRowSpan(x, y)`

For advanced pixel format usage there are multiple [PixelFormat implementations](https://github.com/JimBobSquarePants/ImageSharp/tree/master/src/ImageSharp/PixelFormats) available allowing developers to implement their own color models in the same manner as Microsoft XNA Game Studio and MonoGame.
For advanced pixel format usage there are multiple [PixelFormat implementations](https://github.com/SixLabors/ImageSharp/tree/master/src/ImageSharp/PixelFormats) available allowing developers to implement their own color models in the same manner as Microsoft XNA Game Studio and MonoGame.

All in all this should allow image processing to be much more accessible to developers which has always been my goal from the start.

Expand Down
4 changes: 0 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ skip_branch_with_pr: true
init:
- ps: iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/PureKrome/0f79e25693d574807939/raw/8cf3160c9516ef1f4effc825c0a44acc918a0b5a/appveyor-build-info.ps'))

# temp work around - https://appveyor.statuspage.io/incidents/m2vdvw39kdk8
hosts:
api.nuget.org: 93.184.221.200

build_script:
- cmd: build.cmd

Expand Down
48 changes: 48 additions & 0 deletions src/ImageSharp/Common/Extensions/ListExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// <copyright file="ListExtensions.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>

namespace ImageSharp.Common.Extensions
{
using System.Collections.Generic;

/// <summary>
/// Encapsulates a series of time saving extension methods to the <see cref="T:System.Collections.Generic.List"/> class.
/// </summary>
internal static class ListExtensions
{
/// <summary>
/// Inserts an item at the given index automatically expanding the capacity if required.
/// </summary>
/// <typeparam name="T">The type of object within the list</typeparam>
/// <param name="list">The list</param>
/// <param name="index">The index</param>
/// <param name="item">The item to insert</param>
public static void SafeInsert<T>(this List<T> list, int index, T item)
{
if (index >= list.Count)
{
list.Add(item);
}
else
{
list[index] = item;
}
}

/// <summary>
/// Removes the last element from a list and returns that element. This method changes the length of the list.
/// </summary>
/// <typeparam name="T">The type of object within the list</typeparam>
/// <param name="list">The list</param>
/// <returns>The last element in the specified sequence.</returns>
public static T Pop<T>(this List<T> list)
{
int last = list.Count - 1;
T item = list[last];
list.RemoveAt(last);
return item;
}
}
}
2 changes: 1 addition & 1 deletion src/ImageSharp/Common/Extensions/StreamExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static void Skip(this Stream stream, int count)

if (stream.CanSeek)
{
stream.Position += count;
stream.Seek(count, SeekOrigin.Current); // Position += count;
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions src/ImageSharp/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public sealed class Configuration
private readonly ConcurrentDictionary<IImageFormat, IImageDecoder> mimeTypeDecoders = new ConcurrentDictionary<IImageFormat, IImageDecoder>();

/// <summary>
/// The list of supported <see cref="IImageFormatDetector"/>s.
/// The list of supported <see cref="IImageFormat"/>s.
/// </summary>
private readonly List<IImageFormatDetector> imageFormatDetectors = new List<IImageFormatDetector>();
private readonly ConcurrentBag<IImageFormat> imageFormats = new ConcurrentBag<IImageFormat>();

/// <summary>
/// The list of supported <see cref="IImageFormat"/>s.
/// The list of supported <see cref="IImageFormatDetector"/>s.
/// </summary>
private readonly HashSet<IImageFormat> imageFormats = new HashSet<IImageFormat>();
private ConcurrentBag<IImageFormatDetector> imageFormatDetectors = new ConcurrentBag<IImageFormatDetector>();

/// <summary>
/// Initializes a new instance of the <see cref="Configuration" /> class.
Expand Down Expand Up @@ -140,7 +140,7 @@ public void AddImageFormat(IImageFormat format)
/// </summary>
/// <param name="extension">The extension to discover</param>
/// <returns>The <see cref="IImageFormat"/> if found otherwise null</returns>
public IImageFormat FindFormatByFileExtensions(string extension)
public IImageFormat FindFormatByFileExtension(string extension)
{
return this.imageFormats.FirstOrDefault(x => x.FileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase));
}
Expand Down Expand Up @@ -186,7 +186,7 @@ public void SetDecoder(IImageFormat imageFormat, IImageDecoder decoder)
/// </summary>
public void ClearImageFormatDetectors()
{
this.imageFormatDetectors.Clear();
this.imageFormatDetectors = new ConcurrentBag<IImageFormatDetector>();
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Formats/Bmp/BmpFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace ImageSharp.Formats
using System.Collections.Generic;

/// <summary>
/// Registers the image encoders, decoders and mime type detectors for the jpeg format.
/// Registers the image encoders, decoders and mime type detectors for the bmp format.
/// </summary>
internal sealed class BmpFormat : IImageFormat
{
Expand Down
4 changes: 4 additions & 0 deletions src/ImageSharp/Formats/Gif/GifDecoderCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ public Image<TPixel> Decode(Stream stream)
}

nextFlag = stream.ReadByte();
if (nextFlag == -1)
{
break;
}
}
}
finally
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Formats/Gif/GifFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace ImageSharp.Formats
using System.Collections.Generic;

/// <summary>
/// Registers the image encoders, decoders and mime type detectors for the jpeg format.
/// Registers the image encoders, decoders and mime type detectors for the gif format.
/// </summary>
internal sealed class GifFormat : IImageFormat
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// ReSharper disable InconsistentNaming
// <auto-generated />
#pragma warning disable
namespace ImageSharp.Formats.Jpg
namespace ImageSharp.Formats.Jpeg.Common
{
using System.Numerics;
using System.Runtime.CompilerServices;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<#
char[] coordz = {'X', 'Y', 'Z', 'W'};
#>
namespace ImageSharp.Formats.Jpg
namespace ImageSharp.Formats.Jpeg.Common
{
using System.Numerics;
using System.Runtime.CompilerServices;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
// ReSharper disable InconsistentNaming
namespace ImageSharp.Formats.Jpg
namespace ImageSharp.Formats.Jpeg.Common
{
using System;
using System.Buffers;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

using ImageSharp.Formats.Jpeg.GolangPort.Utils;

/// <summary>
/// DCT code Ported from https://github.com/norishigefukushima/dct_simd
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats.Jpg.Components
namespace ImageSharp.Formats.Jpeg.GolangPort.Components
{
using ImageSharp.Formats.Jpeg.Common;

using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;

/// <summary>
/// Poor man's stackalloc: Contains a value-type <see cref="float"/> buffer sized for 4 <see cref="Block8x8F"/> instances.
/// Poor man's stackalloc: Contains a value-type <see cref="float"/> buffer sized for 4 <see cref="Common.Block8x8F"/> instances.
/// Useful for decoder/encoder operations allocating a block for each Jpeg component.
/// </summary>
internal unsafe struct BlockQuad
{
/// <summary>
/// The value-type <see cref="float"/> buffer sized for 4 <see cref="Block8x8F"/> instances.
/// The value-type <see cref="float"/> buffer sized for 4 <see cref="Common.Block8x8F"/> instances.
/// </summary>
public fixed float Data[4 * Block8x8F.ScalarCount];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
// </copyright>
// ReSharper disable InconsistentNaming

namespace ImageSharp.Formats.Jpg
namespace ImageSharp.Formats.Jpeg.GolangPort.Components
{
using System.Numerics;
using System.Runtime.CompilerServices;

using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;

/// <summary>
/// Contains forward and inverse DCT implementations
/// </summary>
Expand Down
Loading