use of org.alfresco.repo.content.transform.magick.ImageTransformationOptions in project alfresco-repository by Alfresco.
the class TransformationOptionsConverterTest method testImageTransformationOptionsPage.
@Test
public // Checks we do what was in the legacy ImageMagickContentTransformerWorker
void testImageTransformationOptionsPage() {
ImageTransformationOptions oldOptions = new ImageTransformationOptions();
oldOptions.setAutoOrient(false);
PagedSourceOptions pagedSourceOptions = new PagedSourceOptions();
pagedSourceOptions.setStartPageNumber(1);
pagedSourceOptions.setEndPageNumber(1);
oldOptions.addSourceOptions(pagedSourceOptions);
assertConverterToMapAndBack(oldOptions, MIMETYPE_IMAGE_JPEG, MIMETYPE_IMAGE_PNG, "ImageTransformationOptions [commandOptions=, " + "resizeOptions=null, autoOrient=false], " + "sourceOptions={ PagedSourceOptionsPagedSourceOptions {1, 1}} ]", "endPage=0 startPage=0 " + "timeout=-1 ", true);
}
use of org.alfresco.repo.content.transform.magick.ImageTransformationOptions in project alfresco-repository by Alfresco.
the class TransformationOptionsConverterTest method testImageTransformationOptions.
@Test
public // Checks we do what was in the legacy ImageMagickContentTransformerWorker
void testImageTransformationOptions() {
ImageTransformationOptions oldOptions = new ImageTransformationOptions();
assertConverterToMapAndBack(oldOptions, MIMETYPE_IMAGE_JPEG, MIMETYPE_IMAGE_PNG, "ImageTransformationOptions [commandOptions=, resizeOptions=null, autoOrient=true]]", "autoOrient=true " + "timeout=-1 ", true);
}
use of org.alfresco.repo.content.transform.magick.ImageTransformationOptions in project alfresco-repository by Alfresco.
the class TransformationOptionsConverterTest method testImageTransformationOptionsResizePercent.
@Test
public // Checks we do what was in the legacy ImageMagickContentTransformerWorker
void testImageTransformationOptionsResizePercent() {
ImageTransformationOptions oldOptions = new ImageTransformationOptions();
oldOptions.setAutoOrient(false);
ImageResizeOptions imageResizeOptions = new ImageResizeOptions();
imageResizeOptions.setAllowEnlargement(false);
imageResizeOptions.setMaintainAspectRatio(false);
imageResizeOptions.setPercentResize(true);
oldOptions.setResizeOptions(imageResizeOptions);
assertConverterToMapAndBack(oldOptions, MIMETYPE_IMAGE_JPEG, MIMETYPE_IMAGE_PNG, "ImageTransformationOptions [commandOptions=, " + "resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=false, " + "percentResize=true, resizeToThumbnail=false, allowEnlargement=false], autoOrient=false]]", "allowEnlargement=false " + "maintainAspectRatio=false " + "resizePercentage=true " + "timeout=-1 ", true);
}
use of org.alfresco.repo.content.transform.magick.ImageTransformationOptions in project alfresco-repository by Alfresco.
the class TransformationOptionsConverterTest method testImageTransformationOptionsResizeThumbnnail.
@Test
public // Checks we do what was in the legacy ImageMagickContentTransformerWorker
void testImageTransformationOptionsResizeThumbnnail() {
ImageTransformationOptions oldOptions = new ImageTransformationOptions();
oldOptions.setAutoOrient(false);
ImageResizeOptions imageResizeOptions = new ImageResizeOptions();
imageResizeOptions.setAllowEnlargement(false);
imageResizeOptions.setMaintainAspectRatio(false);
imageResizeOptions.setResizeToThumbnail(true);
oldOptions.setResizeOptions(imageResizeOptions);
assertConverterToMapAndBack(oldOptions, MIMETYPE_IMAGE_JPEG, MIMETYPE_IMAGE_PNG, "ImageTransformationOptions [commandOptions=, " + "resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=false, " + "percentResize=false, resizeToThumbnail=true, allowEnlargement=false], autoOrient=false]]", "allowEnlargement=false " + "maintainAspectRatio=false " + "thumbnail=true " + "timeout=-1 ", true);
}
use of org.alfresco.repo.content.transform.magick.ImageTransformationOptions in project alfresco-repository by Alfresco.
the class TransformationOptionsConverterTest method testImageTransformationOptionsResizeNoAspectRatio.
@Test
public // Checks we do what was in the legacy ImageMagickContentTransformerWorker
void testImageTransformationOptionsResizeNoAspectRatio() {
ImageTransformationOptions oldOptions = new ImageTransformationOptions();
oldOptions.setAutoOrient(false);
ImageResizeOptions imageResizeOptions = new ImageResizeOptions();
imageResizeOptions.setMaintainAspectRatio(false);
oldOptions.setResizeOptions(imageResizeOptions);
assertConverterToMapAndBack(oldOptions, MIMETYPE_IMAGE_JPEG, MIMETYPE_IMAGE_PNG, "ImageTransformationOptions [commandOptions=, " + "resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=false, " + "percentResize=false, resizeToThumbnail=false, allowEnlargement=true], autoOrient=false]]", "maintainAspectRatio=false " + "timeout=-1 ", true);
}
Aggregations