Having done some work trying to remove legacy transformers REPO-4710, it became clear that there were still some problems in the TransformOptionsConverter that only came to light because legacy transformers were not being used. These are:
alphaRemove should have been set if the target mimetype is jpeg.
allowEnlargement, autoOrient, maintainAspectRatio were only being added if set to true. They should have been set to true if already true, or true if null (because that was the default in the legacy options) or false if set to false. The maintainAspectRatio value was extra special, because historically (for legacy transforms) it was only being set if the value was false and the latest T-Engines were only passing the maintainAspectRatio if true. In other words the default was the other way around.
cropXOffset, cropYOffset should always be set if there are crop options. 0 was excluded previously.
page should be set rather than startPage and endPage were the same but only if the source mimetype was pdf. There was no check for pdf. This is for pdfrenderer rather than imagemagic.
As both source and target mimetypes are required, a number of calling classes needed to change.
The RenditionServiceIntegrationTest was the only test that has an actual change in it. It now sets maintainAspectRatio to true as the legacy ImageRenderingEngine defaulted it to false (the opposite default to the legacy options). This was fine as long as a legacy transform was used, because it would either set "!" in the argument to a local imagemagic process when false or because of the errors described above to do with maintainAspectRatio the converted value became true and would be past to a T-Engine which in turn set "!". Until the TransformOptionsConverter was fixed, no local transform appeared able to do the transform. After the fix, the false value was past to the T-Engine and then ignore, so the "!" was not set resulting in a unexpected size of image on transform.
* [maven-release-plugin][skip ci] prepare release alfresco-repository-repo-4710-9
* [maven-release-plugin][skip ci] prepare for next development iteration
* Dev build repo-4710-9.1
* [maven-release-plugin][skip ci] prepare release alfresco-repository-repo-4710-9.1
* [maven-release-plugin][skip ci] prepare for next development iteration
* Remove travis dev build code
Co-authored-by: Travis CI User <build@alfresco.com>