Roughsketch / imagesize

Quickly probe the size of various image formats without reading the entire file.
MIT License
57 stars 12 forks source link

Parse data using nom or similar libraries. #3

Closed Roughsketch closed 6 years ago

Roughsketch commented 7 years ago

Might look into doing this. This would allow splitting each image type into separate crates (i.e., imagesize-jpeg, imagesize-png, etc) and also make the checking in general a lot cleaner.

The only potential downside I see is that nom may potentially be a lot slower, but that is something I will have to bench myself.

Roughsketch commented 6 years ago

Throwing out this idea for now. The only image format that would need parsing would be JPEG, but since I believe the APPn and thumbnail bugs are fixed I don't think making a parser would be beneficial. Also for other image formats, the parser would be so minimal that the current implementation would probably be much simpler.