diff --git a/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/License.md b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/License.md new file mode 100644 index 0000000000..f16bcd0ef4 --- /dev/null +++ b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/License.md @@ -0,0 +1,27 @@ + +Paint.NET PCX Plugin +Copyright (C) 2006-2015 Joshua Bell (inexorabletash@gmail.com) +with modifications by the BizHawk team + +Portions Copyright (c) 2006 Rick Brewster, Chris Crosetto, Dennis Dietrich, +Tom Jackson, Michael Kelsey, Brandon Ortiz, Craig Taylor, Chris Trevino, +and Luke Walker. + + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/src/BizHawk.Client.EmuHawk/AVOut/Quantize/OctreeQuantizer.cs b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/OctreeQuantizer.cs similarity index 95% rename from src/BizHawk.Client.EmuHawk/AVOut/Quantize/OctreeQuantizer.cs rename to ExternalProjects/PcxFileTypePlugin.HawkQuantizer/OctreeQuantizer.cs index 79595b131b..5b597c35f2 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/Quantize/OctreeQuantizer.cs +++ b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/OctreeQuantizer.cs @@ -14,19 +14,17 @@ // Based on: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/colorquant.asp -//BizHawk says: adapted from https://github.com/inexorabletash/PcxFileType/blob/master/Quantize - using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; -namespace BizHawk.Client.EmuHawk +namespace PcxFileTypePlugin.Quantize { /// /// Quantize using an Octree /// - internal class OctreeQuantizer : Quantizer + public class OctreeQuantizer : Quantizer { /// /// Stores the tree diff --git a/src/BizHawk.Client.EmuHawk/AVOut/Quantize/PaletteTable.cs b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PaletteTable.cs similarity index 88% rename from src/BizHawk.Client.EmuHawk/AVOut/Quantize/PaletteTable.cs rename to ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PaletteTable.cs index 8b11d20bfb..e6f0186a8b 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/Quantize/PaletteTable.cs +++ b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PaletteTable.cs @@ -12,11 +12,9 @@ // Copyright (C) Joshua Bell ///////////////////////////////////////////////////////////////////////////////// -//BizHawk says: adapted from https://github.com/inexorabletash/PcxFileType/blob/master/Quantize - using System.Drawing; -namespace BizHawk.Client.EmuHawk +namespace PcxFileTypePlugin.Quantize { public sealed class PaletteTable { diff --git a/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PcxFileTypePlugin.HawkQuantizer.csproj b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PcxFileTypePlugin.HawkQuantizer.csproj new file mode 100644 index 0000000000..cf49e8ead9 --- /dev/null +++ b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/PcxFileTypePlugin.HawkQuantizer.csproj @@ -0,0 +1,12 @@ + + + netstandard2.0 + + + + true + + + + + diff --git a/src/BizHawk.Client.EmuHawk/AVOut/Quantize/Quantizer.cs b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/Quantizer.cs similarity index 95% rename from src/BizHawk.Client.EmuHawk/AVOut/Quantize/Quantizer.cs rename to ExternalProjects/PcxFileTypePlugin.HawkQuantizer/Quantizer.cs index ef588d0c25..d7ee04dd20 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/Quantize/Quantizer.cs +++ b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/Quantizer.cs @@ -14,14 +14,12 @@ // Based on: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/colorquant.asp -//BizHawk says: adapted from https://github.com/inexorabletash/PcxFileType/blob/master/Quantize - using System.Drawing; using System.Drawing.Imaging; -namespace BizHawk.Client.EmuHawk +namespace PcxFileTypePlugin.Quantize { - internal abstract unsafe class Quantizer + public abstract unsafe class Quantizer { /// /// Flag used to indicate whether a single pass or two passes are needed for quantization. diff --git a/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/README.md b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/README.md new file mode 100644 index 0000000000..b637b202e8 --- /dev/null +++ b/ExternalProjects/PcxFileTypePlugin.HawkQuantizer/README.md @@ -0,0 +1 @@ +Modified copy of a subset of [EzArIk/PcxFileType](https://github.com/EzArIk/PcxFileType). As with upstream, this is distributed under the terms and conditions of the MIT license. See License.md for more information. diff --git a/References/PcxFileTypePlugin.HawkQuantizer.deps.json b/References/PcxFileTypePlugin.HawkQuantizer.deps.json new file mode 100644 index 0000000000..2fc5cdba86 --- /dev/null +++ b/References/PcxFileTypePlugin.HawkQuantizer.deps.json @@ -0,0 +1,72 @@ +{ + "runtimeTarget": { + "name": ".NETStandard,Version=v2.0/", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETStandard,Version=v2.0": {}, + ".NETStandard,Version=v2.0/": { + "PcxFileTypePlugin.HawkQuantizer/1.0.0": { + "dependencies": { + "Microsoft.NETFramework.ReferenceAssemblies": "1.0.0", + "NETStandard.Library": "2.0.3", + "System.Drawing.Common": "4.7.0" + }, + "runtime": { + "PcxFileTypePlugin.HawkQuantizer.dll": {} + } + }, + "Microsoft.NETCore.Platforms/1.1.0": {}, + "Microsoft.NETFramework.ReferenceAssemblies/1.0.0": {}, + "NETStandard.Library/2.0.3": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0" + } + }, + "System.Drawing.Common/4.7.0": { + "runtime": { + "lib/netstandard2.0/System.Drawing.Common.dll": { + "assemblyVersion": "4.0.0.1", + "fileVersion": "4.6.26919.2" + } + } + } + } + }, + "libraries": { + "PcxFileTypePlugin.HawkQuantizer/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "path": "microsoft.netcore.platforms/1.1.0", + "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" + }, + "Microsoft.NETFramework.ReferenceAssemblies/1.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-7D2TMufjGiowmt0E941kVoTIS+GTNzaPopuzM1/1LSaJAdJdBrVP0SkZW7AgDd0a2U1DjsIeaKG1wxGVBNLDMw==", + "path": "microsoft.netframework.referenceassemblies/1.0.0", + "hashPath": "microsoft.netframework.referenceassemblies.1.0.0.nupkg.sha512" + }, + "NETStandard.Library/2.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", + "path": "netstandard.library/2.0.3", + "hashPath": "netstandard.library.2.0.3.nupkg.sha512" + }, + "System.Drawing.Common/4.7.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==", + "path": "system.drawing.common/4.7.0", + "hashPath": "system.drawing.common.4.7.0.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/References/PcxFileTypePlugin.HawkQuantizer.dll b/References/PcxFileTypePlugin.HawkQuantizer.dll new file mode 100644 index 0000000000..2d6c3a6c0b Binary files /dev/null and b/References/PcxFileTypePlugin.HawkQuantizer.dll differ diff --git a/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs b/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs index 594d4753e6..13856e6fc2 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/GifWriter.cs @@ -1,11 +1,12 @@ using System; using System.IO; using System.Drawing; -using System.Windows.Forms; using BizHawk.Client.Common; using BizHawk.Emulation.Common; +using PcxFileTypePlugin.Quantize; + namespace BizHawk.Client.EmuHawk { [VideoWriter("gif", "GIF writer", "Creates an animated .gif")] diff --git a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 01c63609fb..35a96f1ed8 100755 --- a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -85,6 +85,7 @@ +