【发布时间】:2015-02-22 06:39:27
【问题描述】:
我在TgtImageWatermarkTemplate 组件(它是 Gnostice PDFtoolkit VCL 库的一部分)中设置水印图像格式时遇到问题。我有以下代码:
var
Watermark: TgtImageWatermarkTemplate;
begin
...
// create and set watermark properties
Watermark := TgtImageWatermarkTemplate.Create;
Watermark.ImageFormat := ofJPEG; // <- this line fails the compilation
...
end;
但是编译失败,报如下错误:
[DCC 错误] Unit1.pas(186): E2003 未声明的标识符:'ofJPEG'
[DCC 致命错误] Project1.dpr(5): F2063 无法编译使用的单元“Unit1.pas”
失败经过时间:00:00:01.5
ofJPEG 标识符在哪个单元中声明(我认为它是TgtOutFormat 枚举的成员)?我应该在我的使用条款中添加哪个单位?
【问题讨论】:
-
你有图书馆的来源吗?如果是这样,请在其中查找
ofJPEG。 -
我没有库的来源。我从 Gnostice 的网站获得这个组件:gnostice.com/PDFtoolkit_VCL.asp
-
枚举值应改为ifJPEG。