Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when extract tag from emf #43

Open
troopson opened this issue Sep 15, 2017 · 1 comment
Open

NullPointerException when extract tag from emf #43

troopson opened this issue Sep 15, 2017 · 1 comment

Comments

@troopson
Copy link

Exception in thread "main" java.lang.NullPointerException
at org.freehep.graphicsio.emf.EMFImageLoader.readImage(EMFImageLoader.java:271)
at org.freehep.graphicsio.emf.gdi.StretchDIBits.read(StretchDIBits.java:95)
at org.freehep.graphicsio.emf.EMFTag.read(EMFTag.java:38)
at org.freehep.util.io.TaggedInputStream.readTag(TaggedInputStream.java:112)
at com.pm.spl.Emf2text.extractText(Emf2text.java:38)
at com.pm.Main.main(Main.java:25)

00008.zip

@troopson troopson changed the title when extract tag NullPointerException when extract tag from emf Sep 15, 2017
daRoof added a commit to daRoof/freehep-vectorgraphics that referenced this issue Jan 31, 2019
The EMFImageLoader is called multiple times without providing a BlendFunction. see freehep#43
This causes a NPE, in case the image is a 32 bit EMF.
I don't know if 0xFF is the correct default value, but at least this fixes the NPE.
@daRoof
Copy link

daRoof commented Jan 31, 2019

I included a fix for this in pull request #45.

It was pretty hard to get any meaningful data from the provided file. A little more information on how to read the EMF would have been helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants