我运行了一个java chatgame客户端,它会在聊天中显示之前加载图片。
我确实通过Yahoo Smush.it压缩了我们在聊天游戏中使用的所有图片,但在Java控制台中出现此错误之后:
java.util.zip.ZipException: unknown compression method
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:344)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
Uncaught error fetching image:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at sun.awt.image.PNGFilterInputStream.read(PNGImageDecoder.java:810)
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:221)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:346)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
但是现在我已经打开了photoshop中的所有图片并再次保存,但是它需要超过20MB的磁盘,所以我的问题是:
如何正确压缩我的所有图像,而不会与java压缩冲突? 任何网站?