BUGFIX: 通过hsv批量获取潘通信息,替换rgb
This commit is contained in:
@@ -258,6 +258,11 @@ public class PanToneServiceImpl extends ServiceImpl<PanToneMapper, PanTone> impl
|
|||||||
d.setH(getRgbByHsvBatchDTO.getH());
|
d.setH(getRgbByHsvBatchDTO.getH());
|
||||||
d.setS(getRgbByHsvBatchDTO.getS());
|
d.setS(getRgbByHsvBatchDTO.getS());
|
||||||
d.setV(getRgbByHsvBatchDTO.getV());
|
d.setV(getRgbByHsvBatchDTO.getV());
|
||||||
|
// 不使用数据库中存储的RGB值,使用通过hsv计算得到的RGB值
|
||||||
|
int[] rgb = PantoneUtils.hsvToRgb(d.getH(), d.getS(), d.getV());
|
||||||
|
d.setR(rgb[0]);
|
||||||
|
d.setG(rgb[1]);
|
||||||
|
d.setB(rgb[2]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Map<Integer, PantoneVO> valueToPantoneVo = templateResposne.stream().collect(Collectors.toMap(
|
Map<Integer, PantoneVO> valueToPantoneVo = templateResposne.stream().collect(Collectors.toMap(
|
||||||
|
|||||||
Reference in New Issue
Block a user