作者:丝兰郁香 | 来源:互联网 | 2023-01-13 13:15
Giventhisarchedtextimage,blackpixelsontransparentbackground,withantialiasing给定这个拱形文本图像,透
Given this arched text image, black pixels on transparent background, with antialiasing
给定这个拱形文本图像,透明背景上的黑色像素,具有抗锯齿功能
I would ultimately like to have a CMYK rendering of this text, where every black pixel becomes a specific CMYK color, say magenta, or {72,36,9,28}, or whatever my customer specifies. The ultimate output will be PDF. Every transparent pixel needs to remain transparent, as there may be other PDF objects under the text.
我最终想要这个文本的CMYK渲染,其中每个黑色像素变成特定的CMYK颜色,比如品红色,或者{72,36,9,28},或者我的客户指定的任何颜色。最终输出将是PDF。每个透明像素都需要保持透明,因为文本下可能还有其他PDF对象。
I would be content with a CMYK+Alpha TIFF equivalent written to disk. Or, possibly, a System.Windows.Media.Imaging.Bitmapimage. Or something else.
我会满足于写入磁盘的CMYK + Alpha TIFF等价物。或者,可能是System.Windows.Media.Imaging.Bitmapimage。或者是其他东西。
My PDF library is ABCpdf.NET 10. I realize that System.Drawing does not support CMYK color format. I'm ok with other third party libraries; I'm already using AForge in another context in the library.
我的PDF库是ABCpdf.NET 10.我意识到System.Drawing不支持CMYK颜色格式。我和其他第三方图书馆一样好;我已经在库中的另一个上下文中使用了AForge。
I am not looking to do RGB to CMYK conversion, not even with a profile. I am not looking to do generic color replacement in a PDF. My customer will specify a definite CMYK target color, and I need to match it exactly; using color conversion on an RGB approximation is not okay.
我不打算做RGB到CMYK转换,甚至没有配置文件。我不打算在PDF中进行通用颜色替换。我的客户将指定一个明确的CMYK目标颜色,我需要完全匹配它;在RGB近似上使用颜色转换是不可行的。
I've flailed around with various things. The closest I got was to swap the colors while staying in RGB -- black becomes transparent, transparent becomes white -- and draw a filled magenta box under the image. That then draws white pixels where the text is not, and the magenta underneath shows through. Considered as a group, this ends up looking like warped magenta text on white. But anything sitting under the group does not show through. link
我已经挥舞着各种各样的东西。我得到的最接近的是交换颜色,同时保持RGB - 黑色变为透明,透明变为白色 - 并在图像下绘制一个填充的洋红色框。然后绘制白色像素,文本不是,下面的洋红色显示通过。被视为一个群体,这最终看起来像白色扭曲的洋红色文字。但是,任何坐在小组下面的东西都没有显示出来。链接
Any ideas?
1 个解决方案