我在java中使用Graphics2D来调整图像大小,它可以完美地处理jpg、png和其他格式。我的问题是动画GIF图像,调整大小后动画消失了!这里是我使用的方法:privateBufferedImagedoResize(intnewWidth,intnewHeight,doublescaleX,doublescaleY,BufferedImagesource){GraphicsConfigurationgc=getDefaultConfiguration();BufferedImageresult=gc.createCompatibleImage(newWidth,newHeight