ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 UserComment
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

matthias schlegel

Germany
6 Posts

Posted - Oct 15 2013 :  07:27:57  Show Profile  Reply
Hello Team Imageen,

i use Delphi 7 and Imageen 5 with the exif-Demo.
After load a picture in StringGrid1.cells[1,42] i see the
value:

GCM_TAG 4029807182852

My routine is:

procedure TMainForm.Button3Click(Sender: TObject);
begin
edit1.text:=StringGrid1.cells[1,42]; //UserComment
end;


the edit1.text value is only GCM_TAG
i nead GCM_TAG 4029807182852

Thank's for help


xequte

39097 Posts

Posted - Oct 16 2013 :  02:15:25  Show Profile  Reply
Hi

You trace the code and examine the value of StringGrid1.cells[1,42] in the IDE.

Does it contain any unreadible characters? (e.g. #13 or #10)



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

matthias schlegel

Germany
6 Posts

Posted - Oct 16 2013 :  03:40:40  Show Profile  Reply
Hello Team Imageen,

i can't find any unreadible characters?

Thank's for help

Matthias Schlegel

Go to Top of Page

xequte

39097 Posts

Posted - Oct 16 2013 :  21:13:06  Show Profile  Reply
Hi

Actually I just checked your file. If you examine it at runtime in the IDE you will see that it contains null characters (#0).

Try this:

function RemoveNullCharacters(const s: String): string;
var
  i: Integer;
begin
  Result := s;
  i := 1;
  while i < Length(Result) do
    if Result[i] = #0 then
      Delete(Result, i, 1)
    else
      Inc(i);
end;

procedure TMainForm.ImageEnView1Click(Sender: TObject);
begin
  Edit1.text := RemoveNullCharacters(StringGrid1.Cells[1, 42]);
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

matthias schlegel

Germany
6 Posts

Posted - Oct 17 2013 :  02:29:31  Show Profile  Reply
Hello Nigel,

now it work's fine.

Thank's for the help.

Matthias Schlegel
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: