Ensure you have an Ameto API key. If you do not have an API key yet, create a free account to get one.
Initialize the ameto client
Ameto ameto = new Ameto("https://api.ameto.de", "<your API key>");
Jpeg
as output formatPipeline jpegPipeline = ameto.add("convertToJpeg")
.format(Pipeline.Format.Jpeg)
.build();
Path pathToAsset = Paths.get("<path/to/image.png>");
Asset asset = ameto.add(pathToAsset);
ProcessedAsset jpegImage = jpegPipeline.push(asset);
Path pathToJpeg = Paths.get("<path/to/image.jpeg");
Files.copy(jpegImage.getEssence(), pathToJpeg);
Ensure you have an Ameto API key. If you do not have an API key yet, create a free account to get one.
Initialize the ameto client
Ameto ameto = new Ameto("https://api.ameto.de", "<your API key>");
Pipeline pipeline_800_600 = ameto.add("image-800x600")
.autoOrient()
.resize(800, 600)
.format(Pipeline.Format.Jpeg)
.build();
Path pathToAsset = Paths.get("<path/to/image.jpeg>");
Asset asset = ameto.add(pathToAsset);
ProcessedAsset image_800_600 = pipeline_800_600.push(asset);
Path pathToJpeg = Paths.get("<path/to/image.jpeg");
Files.copy(image_800_600.getEssence(), pathToJpeg);