Skip to content

Commit

Permalink
Restore Paint.NET compatibility saving a file.
Browse files Browse the repository at this point in the history
Broken between Paint.NET 4.3.3 (worked fine) and 4.3.10 (known to fail).

Close #3
  • Loading branch information
pfusik committed Apr 4, 2022
1 parent 2f7c46f commit 153335a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions win32/QOIPaintDotNet.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// QOIPaintDotNet.cs - QOI Paint.NET plugin
//
// Copyright (C) 2021 Piotr Fusik
// Copyright (C) 2021-2022 Piotr Fusik
//
// MIT License:
//
Expand All @@ -25,16 +25,15 @@
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;

using PaintDotNet;
using PaintDotNet.Rendering;

[assembly: AssemblyTitle("Paint.NET Quite OK Image (QOI) plugin")]
[assembly: AssemblyCompany("Piotr Fusik")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyCopyright("Copyright © 2021-2022")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]

namespace QOI.PaintDotNet
{
Expand Down Expand Up @@ -77,7 +76,7 @@ protected override Document OnLoad(Stream input)
protected override void OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback)
{
// Fetch from Paint.NET
input.CreateRenderer().Render(scratchSurface, Point2Int32.Zero);
input.CreateRenderer().Render(scratchSurface);
int width = input.Width;
int height = input.Height;
int[] pixels = new int[width * height];
Expand Down
2 changes: 1 addition & 1 deletion win32/setup/license.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{\fonttbl {\f0\fswiss\fcharset0 Arial;}}
\f0\sa100\fs18\lang1033

Copyright (C) 2021 Piotr Fusik
Copyright (C) 2021-2022 Piotr Fusik

\par\ql
This is free software. Website: https://github.com/pfusik/qoi-ci
Expand Down
4 changes: 2 additions & 2 deletions win32/win32.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
VERSION = 1.1.0
VERSION = 1.1.1

IMAGINE_DIR = $(LOCALAPPDATA)/Imagine
CSC = "C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/Roslyn/csc.exe" -nologo
PAINT_NET_DIR = C:/Program Files/paint.net
DOTNET_REF_DIR = C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.1/ref/net6.0
DOTNET_REF_DIR = C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.3/ref/net6.0
DO_SIGN = signtool sign -d "Quite OK Image plugins $(VERSION)" -n "Open Source Developer, Piotr Fusik" -tr http://time.certum.pl -fd sha256 -td sha256 $^ && touch $@

win32/QOI.plg64: win32/qoiimagine.c transpiled/QOI.c
Expand Down

0 comments on commit 153335a

Please sign in to comment.