[英]How to convert DeviceGray color to rgb?
I read pdf structure using itext 7.0.4
library and when I read stream
I found DeviceGray color
in following form:我使用itext 7.0.4
库读取 pdf 结构,当我读取stream
我发现DeviceGray color
为以下形式:
1 g
and how can I convert it to RGB
format?以及如何将其转换为RGB
格式?
float[] hsv = color.getColorValue();
int rgb = Color.HSBtoRGB(hsv[0], hsv[1], hsv[2]);
Color target = new Color(rgb);
where color
is instance of com.itextpdf.kernel.color.DeviceGray
其中color
是com.itextpdf.kernel.color.DeviceGray
实例
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.