openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

Initial outline for allowing processing of in-memory buffers #106

Closed anjackson closed 3 years ago

anjackson commented 6 years ago

Hi @bitsgalore

This is an outline of a modification we would find useful for the BL Blitter work (see britishlibrary/blitter#4).

We'd like to be able to operate on in-memory data, but the current checkOneFile API is hard-coded to work on files. I've tried two different ways of implementing this, and this pull request seems to be the cleanest. But note I've not actually tested it yet!

Before testing it properly, I wanted to find out if you were happy to support in-memory analysis and if so, what you thought would be the cleanest way of implementing it?

(The other tactic I tried -- and used in production -- is here: https://github.com/britishlibrary/blitter/blob/master/jpylyzer/jpylyzer.py#L290-L318 . The problem with that approach is it makes handling errors more difficult).

bitsgalore commented 6 years ago

Hi @anjackson,

This looks like a useful improvement. Just let me know when you've completed testing, would be happy to accept a pull request along these lines.

bitsgalore commented 3 years ago

Closing because https://github.com/openpreserve/jpylyzer/pull/162 takes care of this.