1

The documentation for Google App Engine says:

The service accepts image data in the JPEG, PNG, WEBP, GIF (including animated GIF), BMP, TIFF and ICO formats.

It can return transformed images in the JPEG, WEBP and PNG formats. If the input format and the output format are different, the service converts the input data to the output format before performing the transformation.

However, the development server doesn't support ICO out of the box. On startup, it gives this warning:

WARNING: No image reader found for format "ico". An ImageIO plugin must be installed to use this format with the DevAppServer.

So, how do I install a plugin for the DevAppServer? I found https://github.com/haraldk/TwelveMonkeys, which has an ICO plugin, but merely putting it on the webapp classpath is not enough. I can't call ImageIO.scanForPlugins() because ImageIO is not on Google's JRE whitelist.

How do I use ImageIO plugins with the DevAppServer?

stickfigure
  • 13,458
  • 5
  • 34
  • 50
  • I'm not too familiar with the Google AppEnding, but if I understand correctly, the DevAppServer is a Java application. If you can add the JARs to the server's class path, it should work. Also, remember that you need all of the dependencies, not just the `imageio-ico-xxx.jar` installed. See [dependency example](http://haraldk.github.io/TwelveMonkeys/#manual-dependency-example). – Harald K Aug 24 '15 at 08:32
  • Just a quick question though: How will you get this running in production afterwards? If the library is not whitelisted, I fail to see how you can make your prod server recognize the format, no? – Patrice Aug 24 '15 at 16:35
  • The "real" server is supposed to support all of the formats. The development server just emulates the imaging service, using ImageIO. – Harald K Aug 24 '15 at 17:52
  • Maybe a bad idea but: have you tried calling #scanForPlugins() via Reflection? You could also try and copy the code for the ImageIO class into your src directory and call scanForPlugins() from there. In the same manner you should be able to override appengine's classloader functionality to allow everthing you need on a devserver. – konqi Aug 26 '15 at 11:22

0 Answers0