This change is a little big since it´s meant to fix a couple of problems I couldn't solved in the previous PR. The main addition is change signature on the ConvertTo method to receive the target file type (e.g. image or document) alongside the target sub-type (e.g. png), so that the object which implements the File interface can figure out how to convert the file to the target format based on the information mentioned above.
The result seems repetitive for the image package, because conversion between images is pretty much the same, but I can't guarantee the same for conversion across different file types.
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
Ran the test suite locally and QA'd it myself with different images I have for testing purposes.
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] I have checked my code and corrected any misspellings
Pull Request Template
Description
This change is a little big since it´s meant to fix a couple of problems I couldn't solved in the previous PR. The main addition is change signature on the
ConvertTo
method to receive the target file type (e.g. image or document) alongside the target sub-type (e.g. png), so that the object which implements theFile
interface can figure out how to convert the file to the target format based on the information mentioned above.The result seems repetitive for the image package, because conversion between images is pretty much the same, but I can't guarantee the same for conversion across different file types.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Ran the test suite locally and QA'd it myself with different images I have for testing purposes.
Checklist: