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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnMView FillFromDirectory

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
izaque Posted - Jun 29 2012 : 07:59:52
Hi, I'm having problem to get the image dimensions do ImageEnMView, using the "FillFromDirectory". I am using the following code in version 4.1.0:

ImageEnMView1.FillFromDirectory(sfDialogoTodas.SelectedPathName);
for idx := 0 to ImageEnMView1.ImageCount - 1 do
begin
ImageEnMView1.ImageTopText[idx].Caption := 'Imagem ' + inttostr(idx);
ImageEnMView1.ImageInfoText[idx].Caption := inttostr(ImageEnMView1.ImageWidth[idx]) + ' x ' + inttostr(ImageEnMView1.ImageHeight[idx]);
end;



If I load the image with the "LoadFromFile", the above code works correctly. There is another alternative to the above code to use with "FillFromDirectory"?
2   L A T E S T    R E P L I E S    (Newest First)
izaque Posted - Jun 29 2012 : 09:17:23
Thank you very much,
worked perfectly!
w2m Posted - Jun 29 2012 : 08:47:53
When using FillFromDirectory try setting the captions in BeforeImageDraw:

procedure TForm1.ImageEnMView1BeforeImageDraw(Sender: TObject; idx, Left,
  Top: Integer; Canvas: TCanvas);
begin
  ImageEnMView1.ImageTopText[idx].Caption := 'Image ' + inttostr(idx);
  ImageEnMView1.ImageInfoText[idx].Caption := inttostr 
    (ImageEnMView1.ImageOriginalWidth[idx]) + ' x ' + inttostr
    (ImageEnMView1.ImageOriginalWidth[idx]);
end;


When you set the captions right after calling FillFromDirectory not all of the images are loaded yet.

William Miller