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

empty string when call ImageIO.getReaderMIMETypes() #27

Closed
CarolWu1206 opened this issue Aug 22, 2016 · 1 comment
Closed

empty string when call ImageIO.getReaderMIMETypes() #27

CarolWu1206 opened this issue Aug 22, 2016 · 1 comment
Milestone

Comments

@CarolWu1206
Copy link

When jai-imageio-core is not included, the result for ImageIO.getReaderMIMETypes() is
"image/png","image/vnd.wap.wbmp","image/x-png","image/jpeg","image/bmp","image/gif".

After employing the package, the result is
"","image/png","image/vnd.wap.wbmp","image/jpeg","image/x-portable-graymap","image/bmp","image/pcx","image/x-windows-bmp","image/gif","image/x-windows-pcx","image/x-pc-paintbrush","image/x-bmp","image/x-pcx","image/x-png","image/x-portable-bitmap","image/x-portable-pixmap","image/tiff","image/x-portable-anymap".

The empty string in the head causes error, is it possible to remove such a string?

@stain
Copy link
Member

stain commented Apr 4, 2017

Thanks! The empty string seems to come from com.github.jaiimageio.impl.plugins.raw.RawImageReaderSpi

which has weirdly specified:

private static String[] entensions = {""};
private static String[] mimeType = {""};

i don't know which of the many "raw" formats this means, so I've changed those to extension raw and mimetype image/x-raw in RawImageReaderSpi and RawImageWriterSpi

@stain stain closed this as completed Apr 4, 2017
@stain stain added this to the 1.3.2 milestone Apr 4, 2017
eikek added a commit to eikek/emil that referenced this issue Jul 16, 2020
The Part#getContent does a lot of things (potentially) which may
depend on things like the runtime classpath. For example, for an image
part, the image is read into a java.awt.Image and therefore involves
the ImageIO plugin system. This may cause issues (like this:
jai-imageio/jai-imageio-core#27) and also
has a memory and performance implications, obviously.
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