Full frame gif support
Contents
[
Hide
]
Aspose.Imaging supports full-framed export from gif file format to another multi-pages formats.
Example of export from Gif to full-frame Tiff fileformat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String baseDirectoryPath = "D:\\"; | |
String fileName = "Animation.gif"; | |
String inputFilePath = baseDirectoryPath + fileName; | |
String outputFilePath = inputFilePath + "_FullFrame.tif"; | |
String outputFilePath1 = inputFilePath + "_NonFullFrame.tif"; | |
try (Image image = Image.load(inputFilePath)) | |
{ | |
MultiPageOptions multiPageOptions = new MultiPageOptions(new IntRange(2, 5)); | |
TiffOptions tiffOptions = new TiffOptions(TiffExpectedFormat.TiffDeflateRgb); | |
tiffOptions.setMultiPageOptions(multiPageOptions); | |
tiffOptions.setFullFrame(true); | |
image.save(outputFilePath, tiffOptions); | |
tiffOptions.setFullFrame(false); | |
image.save(outputFilePath1, tiffOptions); | |
} |
The result file after saving:
|
|
---|---|
Download result |
Example of export from Gif to full-frame Pdf fileformat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String baseDirectoryPath = "D:\\"; | |
String fileName = "Animation.gif"; | |
String inputFilePath = baseDirectoryPath + fileName; | |
String outputFilePath = inputFilePath + "_FullFrame.pdf"; | |
try (Image image = Image.load(inputFilePath)) | |
{ | |
PdfOptions pdfOptions = new PdfOptions(); | |
pdfOptions.setMultiPageOptions(new MultiPageOptions(new IntRange(2, 5))); | |
pdfOptions.setFullFrame(true); | |
image.save(outputFilePath, pdfOptions); | |
} |
The result file after saving:
|
|
---|---|
Download result |