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
 Proc ProgressBar?

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
PeterPanino Posted - Jun 06 2024 : 08:06:04
I use this Proc method:

ImageEnView1.Proc.ConvertTo(ColorThresholds[i], ieOrdered);

With large images with a huge number of colors, this can take several seconds. Is it possible to update a ProgressBar showing the progress of Proc.ConvertTo?

I tested this one:

procedure TForm1.ImageEnView1Progress(Sender: TObject; per: Integer);
begin
  case ImageEnView1.Proc.ProgressTask of
    ietProcessing  : CodeSite.Send('Processsing: ', per);
    ietAnalysis    : CodeSite.Send('Analyzing: ',   per);
    ietResampling  : CodeSite.Send('Resizing: ',    per);
    ietRotating    : CodeSite.Send('Rotating: ',    per);
    else             CodeSite.Send('else: ',        per);  // Should not occur
  end;
end;


But it returned only the else case!
4   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Jun 07 2024 : 03:13:59
Hi Nigel

Thank you for your fantastic support!
xequte Posted - Jun 06 2024 : 21:12:28
Hi Peter

I have fixed the ProgressTask not being set for some Proc methods. You can email me for the update.

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Jun 06 2024 : 13:38:22
It seems that adding Application.ProcessMessages; to the ProgressBar actions helps.
PeterPanino Posted - Jun 06 2024 : 09:38:23
Now I tried this practical solution:


    ProgressBar1.Visible := True;
    try
      ReduceColors;
    finally
      ProgressBar1.Visible := False;
    end;
	
procedure TForm1.ImageEnView1Progress(Sender: TObject; per: Integer);
begin
  if not ProgressBar1.Visible then EXIT;

  ProgressBar1.Position := per;
end;


However, it does not really show a progress. It only shows the Progressbar at 100%.