pixiv / go-libjpeg

An implementation of Go binding for libjpeg (or libjpeg-turbo).
BSD 3-Clause "New" or "Revised" License
157 stars 52 forks source link

Partially decode images #61

Open gen2brain opened 5 years ago

gen2brain commented 5 years ago

There is an interesting issue here https://github.com/golang/go/issues/10447 , it would be great if you can support that in some way. Maybe to not return nil, err, but image, err where and if possible. Browsers are usually very tolerant and will try their best to display images, even if they are invalid. That can be useful in many cases I guess, not just for browsers.