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

Free Support Forum - aspose.com

Error on conversing svg to tiff. "Image export failed" (Java)

Error on conversing svg to tiff (svg is attched):

ERROR c.d.i.rendering.messaging.SqsInput - error occured while processing the message
    com.aspose.imaging.coreexceptions.ImageSaveException: Image export failed.
    at com.aspose.imaging.Image.a(Unknown Source)
    at com.aspose.imaging.L.a(Unknown Source)
    at com.aspose.imaging.internal.mx.b.a(Unknown Source)
    at com.aspose.imaging.internal.mx.c.a(Unknown Source)
    at com.aspose.imaging.Image.save(Unknown Source)
    at com.devfactory.interfax.rendering.fileformat.ImageProcessor.process(ImageProcessor.java:45)
    at com.devfactory.interfax.rendering.fileformat.FileProcessorDispatcher.process(FileProcessorDispatcher.java:31)
    at com.devfactory.interfax.rendering.ProcessingService.processFile(ProcessingService.java:56)
    at com.devfactory.interfax.rendering.ProcessingService.lambda$processFiles$0(ProcessingService.java:44)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
    at com.devfactory.interfax.rendering.ProcessingService.processFiles(ProcessingService.java:45)
    at com.devfactory.interfax.rendering.ProcessingService.process(ProcessingService.java:37)
    at com.devfactory.interfax.rendering.messaging.SqsInput.input(SqsInput.java:45)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:171)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:120)
    at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMatch(AbstractMethodMessageHandler.java:565)
    at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessageInternal(AbstractMethodMessageHandler.java:520)
    at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessage(AbstractMethodMessageHandler.java:454)
    at org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer.executeMessage(SimpleMessageListenerContainer.java:227)
    at org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer$MessageExecutor.run(SimpleMessageListenerContainer.java:417)
    at org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer$SignalExecutingRunnable.run(SimpleMessageListenerContainer.java:309)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: com.aspose.imaging.internal.Exceptions.ArgumentException: com.aspose.imaging.internal.gM.k : com.aspose.imaging.internal.gM.k : com.aspose.imaging.internal.gM.K : Parameter is invalid[ com.aspose.imaging.internal.hB.V.b
    -1 in null
    com.aspose.imaging.extensions.PenExtensions.toGdiPen
    OutputStream os;
    InputStream is;
    var image = Image.load(is);
    var options = new TiffOptions(TiffExpectedFormat.TiffCcittFax3);
    image.save(os, options);

map2.zip (868.5 KB)

@astafev,

I have worked with the sample file shared by you and have observed the issue specified. A ticket with ID IMAGINGJAVA-1700 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

@astafev

Can you please try using following sample code using Aspose.Imaging for Java 21.2 on your end.

try (Image image = Image.load("map2.svg"))
{
    image.save("map2.svg.png", new PngOptions());

    PngOptions options = new TiffOptions(TiffExpectedFormat.TiffCcittFax3);
    image.save("map2.svg.tiff", options);
}

The issues you have found earlier (filed as IMAGINGJAVA-1700) have been fixed in this update. This message was posted using Bugs notification tool by samer.el-khatib4aspose