We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Trying to merge tif files into multipage tiff

When I read in one tif file with the following code:

                       FileInputStream in = new FileInputStream("d:\\DOCS\\09916001\\09916001.tif");
                    
                        //RasterImage image = (RasterImage) Image.load(fileEntry.getAbsolutePath());
                        RasterImage image = (RasterImage) Image.load(in);
                        // Resize the image according to TiffImage dimensions
                        image.resize(newWidth, newHeight, ResizeType.NearestNeighbourResample);

it throws the following error:

class com.aspose.imaging.internal.ey.c: Can not decode image
com.aspose.imaging.fileformats.dng.DngImage.a(Unknown Source)
com.aspose.imaging.internal.ey.d$a.a(Unknown Source)
com.aspose.imaging.internal.dP.aN.a(Unknown Source)
com.aspose.imaging.internal.dP.aN.a(Unknown Source)
com.aspose.imaging.internal.dP.aN.a(Unknown Source)
com.aspose.imaging.internal.ey.d.loadPartialArgb32Pixels(Unknown Source)
com.aspose.imaging.RasterImage$d.a(Unknown Source)
com.aspose.imaging.internal.dP.aN.a(Unknown Source)
com.aspose.imaging.internal.dP.aN.a(Unknown Source)
com.aspose.imaging.internal.dP.aN.a(Unknown Source)
com.aspose.imaging.RasterImage.loadPixelsInternal(Unknown Source)
com.aspose.imaging.RasterImage.a(Unknown Source)
com.aspose.imaging.RasterImage.a(Unknown Source)
com.aspose.imaging.RasterImage.loadPartialArgb32Pixels(Unknown Source)
com.aspose.imaging.internal.dP.aE.a(Unknown Source)
com.aspose.imaging.internal.dP.bb.a(Unknown Source)
com.aspose.imaging.RasterCachedImage.resize(Unknown Source)
org.bakercounty.CombineTiffImages.main(CombineTiffImages.java:64)
at com.aspose.imaging.fileformats.dng.DngImage.a(Unknown Source)
at com.aspose.imaging.internal.ey.d$a.a(Unknown Source)
at com.aspose.imaging.internal.dP.aN.a(Unknown Source)
at com.aspose.imaging.internal.dP.aN.a(Unknown Source)
at com.aspose.imaging.internal.dP.aN.a(Unknown Source)
at com.aspose.imaging.internal.ey.d.loadPartialArgb32Pixels(Unknown Source)
at com.aspose.imaging.RasterImage$d.a(Unknown Source)
at com.aspose.imaging.internal.dP.aN.a(Unknown Source)
at com.aspose.imaging.internal.dP.aN.a(Unknown Source)
at com.aspose.imaging.internal.dP.aN.a(Unknown Source)
at com.aspose.imaging.RasterImage.loadPixelsInternal(Unknown Source)
at com.aspose.imaging.RasterImage.a(Unknown Source)
at com.aspose.imaging.RasterImage.a(Unknown Source)
at com.aspose.imaging.RasterImage.loadPartialArgb32Pixels(Unknown Source)
at com.aspose.imaging.internal.dP.aE.a(Unknown Source)
at com.aspose.imaging.internal.dP.bb.a(Unknown Source)
at com.aspose.imaging.RasterCachedImage.resize(Unknown Source)
at org.bakercounty.CombineTiffImages.main(CombineTiffImages.java:64)

Any help would be appreciated.

@blee877b0,

I have observed the issue shared by you and request you to please try using Aspose.Imaging 17.7 on your end and if there is still an issue then please provide the source file reproducing the issue on your end.