Access and Export Pages in Multipage Images - Aspose.Imaging for .NET and Java
using (Image image = Image.Load("image.tiff")) | |
{ | |
if (image is IMultipageImage) | |
{ | |
var pages = ((IMultipageImage)image).Pages; | |
} | |
} |
try (Image image = Image.load("image.tiff")) | |
{ | |
if (image instanceof IMultipageImage) | |
{ | |
Image[] pages = ((IMultipageImage)image).getPages(); | |
} | |
} |
int startPage = 3; | |
int countPage = 2; | |
using (Image image = Image.Load("image.gif")) | |
{ | |
TiffOptions tiffOptions = new TiffOptions(TiffExpectedFormat.TiffDeflateRgb); | |
tiffOptions.MultiPageOptions = new MultiPageOptions(new IntRange(startPage, countPage)); | |
image.Save("image.tiff", tiffOptions); | |
} |
int startPage = 3; | |
int countPage = 2; | |
try (Image image = Image.load("image.gif")) | |
{ | |
TiffOptions tiffOptions = new TiffOptions(TiffExpectedFormat.TiffDeflateRgb); | |
tiffOptions.setMultiPageOptions(new MultiPageOptions(new IntRange(startPage, countPage))); | |
image.save("image.tiff", tiffOptions); | |
} |
int startPage = 3; | |
int countPage = 1; | |
using (Image image = Image.Load("image.tiff")) | |
{ | |
PngOptions pngOptions = new PngOptions(); | |
pngOptions.MultiPageOptions = new MultiPageOptions(new IntRange(startPage, countPage)); | |
image.Save("image.png", pngOptions); | |
} |
int startPage = 3; | |
int countPage = 1; | |
try (Image image = Image.load("image.tiff")) | |
{ | |
PngOptions pngOptions = new PngOptions(); | |
pngOptions.setMultiPageOptions(new MultiPageOptions(new IntRange(startPage, countPage))); | |
image.save("image.png", pngOptions); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment