Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Saturday, May 31, 2008 12:36:57 AM(UTC)

erhan  
erhan

Groups: Registered
Posts: 1


Hi I tried Lead tool free eval. 14.5 but check sample code on delphi 6 it gives error How can i solve this problem :| . Code is show below
-------------------------------------------------
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, LEADTwain, LEADDlgService, LEADDlgFile, ExtCtrls,
LEADMain, StdCtrls, LEADDicom;


procedure TForm1.Button4Click(Sender: TObject);
var
Empty: Variant; { For clearing comments }
MyCommentText: string; { String for CMNT_SZDESC }
NewCommentText: string; { String for CMNT_SZDESC that we read }
FilePath: string; { File to be updated }
i: Integer; { Counter }
nRet: Integer;
begin
{ Specify the file that we will update. }
FilePath := 'C:\Images\5.dcm';
{ Specify the Empty variant for clearing comments. }
VarClear(Empty);
{ Get all of the current comments from the file. }
{ Temporarily disable method errors so that we do not fail when comments are missing. }
LeadImage1.EnableMethodErrors := False;
for i := 0 to CMNT_LAST do
begin
LeadImage1.Comment[i] := Empty;
LeadImage1.Comment[i] := LeadImage1.ReadComment(FilePath, 0, i);
end;
LeadImage1.EnableMethodErrors := True;
{ Load and modify the image. }
nRet:= LeadImage1.Load(FilePath, 0, 0, 1);
if(nRet = SUCCESS)then
begin
LeadImage1.Reverse();
{ Update the CMNT_SZDESC comment. }
MyCommentText := CHR(13) + 'This image has been reversed.';
LeadImage1.Comment[CMNT_SZDESC] := LeadImage1.Comment[CMNT_SZDESC] + MyCommentText;
{ Save the file and read the comment that we saved. }
LeadImage1.Save(FilePath, FILE_TIF, LeadImage1.BitmapBits, 0, SAVE_OVERWRITE);
NewCommentText := LeadImage1.ReadComment(FilePath, 0, CMNT_SZDESC);
{ Display the message. }
Application.MessageBox(PChar(NewCommentText), 'File Comments', mb_OK);
{ Clear the comments from memory. }
for i := 0 To CMNT_LAST do
LeadImage1.Comment[i] := Empty;
end;
end;
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, June 1, 2008 5:15:40 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

At the beginning of the Unit1 file, add LEADDef to the uses section
 
#3 Posted : Sunday, June 1, 2008 5:16:38 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

At the beginning of the Unit1 file, add LEADDef to the uses section
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.079 seconds.