Uh oh!
There was an error while loading. Please reload this page.
Adding QOI support - #2446
Conversation
I'm starting to need help because I don't understand the project structure Everything I added was taken from the specification and structured similarly to PNG and BMP
I'm going to do some tests before the pull request and add all the functions
Now it identifies qoi images successfully
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Since you already implemented Identify, your next step is probably to make sure it actually works. Here's an example test, you want an equivalent for Qoi:
ImageSharp/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
Lines 338 to 355 in 7d0bbbd
(I recommend to validate image size and stuff like QoiChannels and QoiColorSpace there.)
To make sure the format is recognized by Image.Identify and Image.Load and triggers your decoder, you also need to implement and register a "configuration module":
ImageSharp/src/ImageSharp/Configuration.cs
Lines 217 to 225 in 7d0bbbd
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
antonfirsov
commented
May 5, 2023
There are some some StyleCop complaints breaking the build since we use When you will move on to the actual Decode implementation, you want to base your decoder tests on this: ImageSharp/tests/ImageSharp.Tests/Formats/Pbm/PbmDecoderTests.cs Lines 81 to 99 in 7d0bbbd First just make sure visually that |
Uh oh!
There was an error while loading. Please reload this page.
LuisAlfredo92
commented
May 5, 2023
Thanks for the reviewing, I'll correct everything and tell when I start working on the other functions 👍 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-Adding validation for size, channels and colorspace -Refactoring to throw general exceptions -Creating tests -Using other better data types
LuisAlfredo92
commented
Jun 12, 2023
Hello again, I can finally work in this again 🎉 I've made the changes you told me, however, I didn't find how to run the tests, so I only added the configurations but didn't test them Soon I'll try to add the Decode and Encode options |
antonfirsov
commented
Jun 13, 2023
You can use dotnet test from the command line: Or if you are using Visual Studio, they should appear in the Test Explorer window. |
-I had several errors about header size comparison and comparing byte arrays, but I've fixed them and tested the Identify function and it works perfect!
Hello again, I need some help with the tests When I try to test the Qoi decoder, when it tries to get the extension, qoi image format never appears: However, during debugging, it actually is correctly added: So I don't know if I must add something else on the code or tests Just in case, my qoi configuration module adds only a decoder and format detector EDIT |
LuisAlfredo92
commented
Jun 21, 2023
JimBobSquarePants
commented
Jun 23, 2023
I need to check phoboslab/qoi#258 because there's a bug with the decoder
See phoboslab/qoi#258 and previous commit
LuisAlfredo92
commented
Jun 25, 2023
Hello! I'll be working on the encoder now |
-Also adding Decode method without TPixel value -Adding stream end check to decoder (we must discuss if it's necesarry or not) -formating general code
LuisAlfredo92
commented
Jun 28, 2023
Hello again I'd like to ask for a review to see if I'm not doing something wrong |
Changing formats from 8 to 9
LuisAlfredo92
commented
Jul 6, 2023
When you publish the 3.1.0 version, could I add ImageSharp it to the phoboslab/qoi repository README? Maybe on tools or implementations |
antonfirsov
commented
Jul 6, 2023
Yeah I also wanted to call out that we need to get into that hall of fame after the release. |





Prerequisites
Description
First of all, I'm sorry for being so late to add this, I've been extremely busy :(
Also I took some time to see the code to understand it and do it with the same structure
Then, I've add some files to work with qoi, at this moment it only identifies qoi images and returns the ImageInfo, but I want to make sure that I'm doing this correctly before doing the rest of functions. I've followed the Stylecop rules with Visual Studio Intellisense.
The test images were taken from the official website in the Test images in QOI and PNG format link.
This is about #2403
Could you review it please?