Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

EMF fails to convert to PNG

Last post 05-29-2009, 11:26 AM by ygrach. 6 replies.
Sort Posts: Previous Next
  •  04-28-2009, 4:50 AM 176992

    EMF fails to convert to PNG Java

    Attachment: Present (inaccessible)
    Hello,
    I receive a problem converting attached EMF to PNG using example code from aspose.metafiles.zip

    The exception is below, OS is Ubuntu 9.04 x64, reproducible on OpenJDK6 and Java6

    Error: Cannot decode the image for the type :
    Occurs in: com.sun.media.jai.opimage.CodecRIFUtil
    java.io.IOException: Map size (0) must be >= 1
        at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76)
        at com.sun.media.jai.codecimpl.BMPImageDecoder.decodeAsRenderedImage(BMPImageDecoder.java:58)
        at com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
        at com.sun.media.jai.opimage.BMPRIF.create(BMPRIF.java:47)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
        at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
        at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
        at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
        at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
        at com.aspose.metafiles.ap.if(SourceFile:226)
        at com.aspose.metafiles.cg.do(SourceFile:62)
        at com.aspose.metafiles.EmfMetafile.playMetafile(SourceFile:112)
        at com.aspose.metafiles.EmfMetafile.playMetafile(SourceFile:150)
        at emf2png.processImage(emf2png.java:85)
        at emf2png.main(emf2png.java:53)
    Caused by: java.lang.IllegalArgumentException: Map size (0) must be >= 1
        at java.awt.image.IndexColorModel.setRGBs(IndexColorModel.java:507)
        at java.awt.image.IndexColorModel.<init>(IndexColorModel.java:173)
        at com.sun.media.jai.codecimpl.BMPImage.<init>(BMPImageDecoder.java:483)
        at com.sun.media.jai.codecimpl.BMPImageDecoder.decodeAsRenderedImage(BMPImageDecoder.java:56)
        ... 19 more
    Exception in thread "main" java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
        at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
        at com.aspose.metafiles.ap.if(SourceFile:226)
        at com.aspose.metafiles.cg.do(SourceFile:62)
        at com.aspose.metafiles.EmfMetafile.playMetafile(SourceFile:112)
        at com.aspose.metafiles.EmfMetafile.playMetafile(SourceFile:150)
        at emf2png.processImage(emf2png.java:85)
        at emf2png.main(emf2png.java:53)

    Please help

    Thanks,
    Yuri
     
  •  04-30-2009, 2:56 AM 177430 in reply to 176992

    Re: EMF fails to convert to PNG

    Please help. Do you recognize the issue?

    Thanks,
    Yuri
     
  •  05-01-2009, 12:01 PM 177628 in reply to 177430

    Re: EMF fails to convert to PNG

    Yes, Yuri, we have reproduced this issue and we are working on fix.
    Thank you for report.

    Nikolay Kuzmin
    Developer
    Aspose.Slides Team
    http://www.aspose.com
    Your File Format Experts
    Keep in touch! We're on Twitter and Facebook
     
  •  05-26-2009, 11:53 AM 181317 in reply to 177628

    Re: EMF fails to convert to PNG

    Hello,
    do you have an update on this?

    Thanks,
    Yuri
     
  •  05-27-2009, 3:01 AM 181398 in reply to 181317

    Re: EMF fails to convert to PNG

    Hello Yuri,

    The problem has been fixed. New version will be available after additional short testing today or tomorrow.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  05-28-2009, 1:45 PM 181695 in reply to 181317

    Re: EMF fails to convert to PNG

    Hello,

    You can download new 1.4.2 version of Aspose.Metafiles here.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  05-29-2009, 11:26 AM 181820 in reply to 181695

    Re: EMF fails to convert to PNG Java

    Attachment: Present (inaccessible)
    Hello,
    thanks, it fixed the problem, however regression arrived.

    see attached emf4.zip

    it contains images that fail w/ 1.4.2 (but were converted ok previously)

    the error message is:
    Raster BytePackedRaster: width = 8 height = 8 #channels 1 xOff = 0 yOff = 0 is incompatible with ColorModel IndexColorModel: #pixelBits = 1 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@1c5ddffa transparency = 1 transIndex   = -1 has alpha = false isAlphaPre = false
    java.lang.IllegalArgumentException: Raster BytePackedRaster: width = 8 height = 8 #channels 1 xOff = 0 yOff = 0 is incompatible with ColorModel IndexColorModel: #pixelBits = 1 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@1c5ddffa transparency = 1 transIndex   = -1 has alpha = false isAlphaPre = false

    Thanks,
    Yuri
     
View as RSS news feed in XML