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
 ImageEn LoadFromURL

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
LHSoft Posted - Jun 14 2013 : 01:00:53
Hello,

I have a liitle problem occuring since version 4.1 or so regarding LoadFromURL:
This is my code:

procedure TPicImport.EditChange(Sender: TObject);
begin
ImageENView.Clear;
ImageENView.ResetState;
ImageEnView.IO.LoadFromURL('http://' + main.Host + '/OLS/Images/' + Edit.Text + '.jpg');
if ImageENView.IO.Params.Height < 10 then exit; //if file does not exist
ImageEnView.Proc.Resample(ImageEnView.Width, ImageENView.Height, rfLanczos3, True);
end;

This worked fine in the past, but since one of the newer versions 4.1xx I only get a small area in the upper left corner filled with part of the pic. Now I must repeat loading after the exit-condition to get it work, what means doing LoadFromURL twice.
The edit is an TEdit to enter some numbers and when you type an number and the pic f.x. 123.jpg exists the pic is shown after running two times with the exit-condition (1.jpg and 12.jpg do not exist, 123.jpg does).

So my question: What has changed and what I do have to change so this will work again?

Best regards
Hans
5   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Jun 15 2013 : 23:28:28
Thank you, it will be fixed in next minor release.
LHSoft Posted - Jun 15 2013 : 15:41:50
Many thanks, thats it.
now it works.

best regards
Hans
fab Posted - Jun 15 2013 : 15:23:21
Hello,
it seems a bug (Aborting is not reset before LoadFromURL). Please try:

begin
 ImageEnView.IO.Aborting := false;   // <--- added
 ImageEnView.IO.LoadFromURL('http://' + main.Host + '/OLS/Images/' + Edit.Text + '.jpg');
 if ImageENView.IO.aborting then exit;
 ImageEnView.Proc.Resample(ImageEnView.Width, ImageENView.Height, rfLanczos3, True);
end;
LHSoft Posted - Jun 15 2013 : 14:31:45
Hello fab,

thanks for the tipp "aborting".

But the problem isn't solved.
It seems, that ImageENView.LoadFromURL has problems with new picture if there was an aborting before.
So, still I have to repeat the LoadFromURL to get picture like

begin
 ImageENView.Clear;
 ImageENView.ResetState;
 ImageEnView.IO.LoadFromURL('http://' + main.Host + '/OLS/Images/' + Edit.Text + '.jpg');
 if ImageENView.IO.aborting then exit;
 ImageEnView.IO.LoadFromURL('http://' + main.Host + '/OLS/Images/' + Edit.Text + '.jpg');
 ImageEnView.Proc.Resample(ImageEnView.Width, ImageENView.Height, rfLanczos3, True);
end;

This need to repeat the LoadFromURL-command appeared in one of the 4.xx Version.

best regards
Hans
fab Posted - Jun 15 2013 : 06:50:07
Hello,
you should check LoadFromURL successful using Aborting property. For example:

ImageEnView1.IO.LoadFromURL('http://www.xequte.com/ImageEnForum/images/logo_forum.gif');
if ImageEnView1.IO.Aborting then
  ShowMessage('not found');