Sign Up
Sign In
Welcome
Guest,
Live Chat
Arabic (العربية)
Chinese Simplified (中文(简体)
Chinese Traditional (中文(繁體)
Dutch (Nederlands)
English
French (français)
German (Deutsch)
Italian (italiano)
Japanese (日本語)
Korean (한국어)
Portuguese (Português)
Russian (русский)
Spanish (español)
Products
.NET Components
Java Components
SSRS Rendering Extensions
JasperReports Exporters
SharePoint Components
Product Family Packs
Free Utilities & Components
Services
Aspose Consulting
Support Services
Purchase
Buy Online
Free Trials
Purchase Policies
Renewal Policies
Reselling Policies
Find a Reseller
Purchase FAQ
End User License Agreement
Sales Support
Support
Documentation
Demos
Forums
Blogs
Downloads
Videos
Corporate
About Us
Contact Us
Community
Customers
Press Center
Careers
Privacy Policy
Terms of Use
Aspose.com
»
Public Forums for Customers an...
»
Aspose.Metafiles Product Famil...
»
Re: EMF fails to convert to PNG
EMF fails to convert to PNG
Last post 05-29-2009, 11:26 AM by
ygrach
. 6 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
04-28-2009, 4:50 AM
176992
ygrach
Joined on 07-21-2008
Posts 14
EMF fails to convert to PNG
Attachment:
Present (inaccessible)
Subscribe
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
ygrach
Joined on 07-21-2008
Posts 14
Re: EMF fails to convert to PNG
Subscribe
Please help. Do you recognize the issue?
Thanks,
Yuri
05-01-2009, 12:01 PM
177628
in reply to
177430
NKuzmin
Joined on 03-16-2005
Posts 115
Re: EMF fails to convert to PNG
Subscribe
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
ygrach
Joined on 07-21-2008
Posts 14
Re: EMF fails to convert to PNG
Subscribe
Hello,
do you have an update on this?
Thanks,
Yuri
05-27-2009, 3:01 AM
181398
in reply to
181317
alcrus
Joined on 01-21-2004
Posts 4,457
Re: EMF fails to convert to PNG
Subscribe
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
alcrus
Joined on 01-21-2004
Posts 4,457
Re: EMF fails to convert to PNG
Subscribe
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
ygrach
Joined on 07-21-2008
Posts 14
Re: EMF fails to convert to PNG
Attachment:
Present (inaccessible)
Subscribe
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