Skip to content

Instantly share code, notes, and snippets.

@ESidenko
Forked from aspose-com-gists/readme.md
Last active February 10, 2022 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ESidenko/0b5bdb9df3854b1cdad7445c8dec0372 to your computer and use it in GitHub Desktop.
Save ESidenko/0b5bdb9df3854b1cdad7445c8dec0372 to your computer and use it in GitHub Desktop.

Aspose.Imaging Java API allows to easy save your images aware on extension in your Java application or Web service.

You can:

  • be sure that image extension corresponds image type.

Interested ?

You may go further at : https://products.aspose.com/imaging/java/

import com.aspose.imaging.Image;
String templatesFolder = "c:\\Users\\USER\\Downloads\\";
String inputFile = templatesFolder + "template.jpg";
String outputFile = templatesFolder + "saveImageExtensionAware.png";
try (Image image = Image.load(inputFile))
{
image.save(outputFile);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment