kinow commented on pull request #116: URL: https://github.com/apache/commons-imaging/pull/116#issuecomment-961799086
@darkma773r I've been thinking the types we use in that class, like `ImageParser`, `ImagingParameter`, and `ImageFormat`. When we pass the arguments to `writeImage`, for example, it includes a `ImageFormat`, and also an `ImagingParameters`. However, when you pass an `ImageFormats.GIF` it's obvious the parameter will be of type `GifImagingParameters`. It is also obvious the parser will be the `GifImageParser`. I'm thinking that maybe we could use something like `ImagingParameters<Gif>` and `ImageParser<Gif>`, eliminating the `ImageFormat`. I think it would be possible to have a map of format=>parser, and a method that retrieves the parser with the right format. Sorry if it's vague, I will think more about it this weekend and see if I can suggest some code to compare with what we have 👍 Bruno -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
