You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
If stride and width are equal, greyscale images will not be handled and have the Data field left at null.
The difference between stride and width is checked a few lines below and the case where they are equal is completely fine, and even handled correctly. The condition should rather be:
I found and fixed a nasty bug regarding greyscale JPEGs. The following condition in the
elsebranch ofImage.ConvertYccis wrong:https://github.com/JBildstein/NanoJpeg.Net/blob/c200b00cc4b3821303907abbada2508d36ad09a7/NanoJpeg/Image.Convert.cs#L76
If stride and width are equal, greyscale images will not be handled and have the
Datafield left atnull.The difference between stride and width is checked a few lines below and the case where they are equal is completely fine, and even handled correctly. The condition should rather be:
Note that this is already a bug in the original NanoJPEG.