Hi,

On IMAGING-159 [1], the current released code of Imaging uses Map<String, 
Object> params to pass parameters to different image parsers.

This was raised as a blocker for the 1.0 release, and we are trying to address 
it in the next alpha release to get the final 1.0 release out of the door.

I had a go and first tried to create a Builder for the parameters (I think 
someone mentioned that in JIRA or in an e-mail), but I couldn't find a good 
design.

Then I added simple POJO's [2] for the parameters and it looked a bit simpler 
to implement. But not dropping the idea of the Builder's. Just wondering what 
others think of the new design.

Any critics, feedback, would be much appreciated. Gary Lucas has reviewed it 
for the TIFF Image Parser, he found a few issues and we've addressed it in the 
pull request.

The Imaging.java class is an entry-point class, calling parsers for different 
formats with public-static-methods. Unfortunately I couldn't avoid using a 
@SupressWarnings there due to not being able to infer the parameter types. I 
left TODO markers there, but happy to amend it if there's any suggestion on how 
to improve it.

This is probably the largest change for 1.0. I'm expecting to be able to 
release it as alpha3, then work on either alpha4 or - finally - the 1.0 release.


Thanks heaps!
Bruno
[1] https://issues.apache.org/jira/browse/IMAGING-159
[2] https://github.com/apache/commons-imaging/pull/116

Reply via email to