gpt4 book ai didi

java - 重新调整图像大小?

转载 作者:行者123 更新时间:2023-12-02 08:18:56 27 4
gpt4 key购买 nike

如何在缩小或放大图像的同时保留图像的分辨率...有没有办法...

最佳答案

您应该检查这里,存在同样的问题:

http://forums.oracle.com/forums/thread.jspa?threadID=1270008

那里提供的解决方案:

TIFFEncodeParam tep = new TIFFEncodeParam();

// Create {X,Y}Resolution fields.
TIFFField fieldXRes = new TIFFField(0x11A, TIFFField.TIFF_RATIONAL,
1, new long[][] {{DPI_X, 1}});
TIFFField fieldYRes = new TIFFField(0x11B, TIFFField.TIFF_RATIONAL,
1, new long[][] {{DPI_Y, 1}});
tep.setExtraFields(new TIFFField[] {fieldXRes, fieldYRes});

关于java - 重新调整图像大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5832237/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com