Fix 8 years broken jpeg image reader in golang std library https://github.com/golang/go/issues/10447#issuecomment-1505832127
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forest
ad28d7de37
|
4 weeks ago | |
---|---|---|
internal/imageutil | 4 weeks ago | |
jpeg | 4 weeks ago | |
LICENSE | 4 weeks ago | |
README.md | 4 weeks ago | |
doc.go | 4 weeks ago | |
go.mod | 4 weeks ago | |
image2.go | 4 weeks ago |
README.md
go-std-image-with-working-jpeg-reader
https://github.com/golang/go/issues/10447#issuecomment-1505832127
So to recap:
1. This issue is now 8 years old and have never been fixed.
2. It is a showstopper for any use of the image library on a server where random images are uploaded.
3. This library behaves worse than any reasonable image processing software out there.
4. The issue could have been easily fixed, by returning a proper error message and the processed image up to the point where the unexpected error happened.
5. The maintainer was not sure about what to do and avoided any decision for 7 years.
6. In this time nobody from the Go developers stepped up to help our fix the issue by himself.
7. After the maintainer prevented any solution from happening for 7 years, he now is unassigned from the issue.
8. Now nobody is assigned to the issue and nobody fixed it.
Great job!
Package image2 fixes problems of the image package within the standard library with decoding JPEG images that are corrupt or broken.
For discussion, see: https://github.com/golang/go/issues/10447
This patch is mainly due to the suggestion of "whorfin" in this comment: https://github.com/golang/go/issues/10447#issuecomment-843447295 and some code and tests of mine
Usage is like the normal jpeg sub package of image, just with a different path (see the example test).
License
MIT