DDS-GmbH / jocument

JVM based template engine for DOCX and XLSX.
MIT License
3 stars 1 forks source link

Make image dimension probing more efficient #111

Closed AntonOellerer closed 2 years ago

AntonOellerer commented 2 years ago

Rn, the whole image is loaded when we want to get its dimensions, which is very inefficient as can be seen here

It would be a whole lot more efficient to instead use this, which aborts as soons as it was able to read the size from e.g. the header

AntonOellerer commented 2 years ago

Fixed in https://github.com/DDS-GmbH/jocument/pull/102/commits/192fa3ae34f60feec2664d8f834df4423dc2f77e