Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 xuggler 获取视频文件的缩略图,并且图像是由 xuggler 创建的,尺寸为 640*480,但我想将图像尺寸设为 200*200 或 2--*2--如果可能的话,请告诉我和我是怎么做的。
你可以在java中调整它的大小:
BufferedImage resizedImage = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, type); Graphics2D g = resizedImage.createGraphics(); g.drawImage(originalImage, 0, 0, IMG_WIDTH, IMG_HEIGHT, null); g.dispose()