## Clear Images in TPicshow v 2.4

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

### Clear Images in TPicshow v 2.4

Hello,

I'm still working with version 2.4 of TPicshow (I can't install version 3.0, see my other posting) and I want to design some kind of slideshow.

The Problem is, when I assign a new Image to my TPicshow Komponent
with picshow1.picture.assign(SomeTPictureimage.picture),
one could see the last Picture still in the back (especially if it is of a different width and height).
I know from the readme that I can't use the clear method to get rid of the old picture. Does anybody know a work around how I could clear the picture anyway ?

Many thanks in Advance,

Frank aka The Nudge
The Nudge
Active Member

Posts: 5
Joined: March 20th, 2003, 10:49 am

Hi,

To remove the image that is stored in the Picture property, you can simply assign nil to Picture.Graphic. To clear the image on the screen to the background, you can call Clear method.

By the way, I recommend to use the latest version of the control. I hope my post on the other topic could be helpful.

Cheers,
Kambiz

Kambiz

Posts: 2430
Joined: March 7th, 2003, 7:10 pm

### Thanks !

Thanks for the advice, I just came back from holiday last week so
I wasn't able to answer. I'll try it out !

Greetings,

Frank aka The Nudge
The Nudge
Active Member

Posts: 5
Joined: March 20th, 2003, 10:49 am

### @all : I don't know that !!!

I have the same problem with the background( I am a beginner). How can I call the CLEAR Method, It is doesn't work. I want clear the background too.

Regards René
drschubi
Member

Posts: 4
Joined: August 20th, 2003, 4:48 pm

Code: Select all
PicShow1.bgPicture.Graphic := nil;

Kambiz

Posts: 2430
Joined: March 7th, 2003, 7:10 pm

Hi There!

i have the same problem and i tryed the following in the procedure ShowNextImage:
Code: Select all
  if ClearOldImage.Checked then    begin      //PicShow.Clear;      PicShow.bgPicture.Graphic := nil;    end;  // Begins the animation  PicShow.Execute;

but the problem is always the same. if i had a large picture which fills the hole area and after it comes a smaller picture, then the old picture will not be deleted or cleared, and the old picture is in the background. i put the given code to the checkboxevent onclick and it works just for one time.

so, please, what is my mistake???

thank u tom
torud
Member

Posts: 1
Joined: September 25th, 2004, 2:21 am

My solution is to take each new image and draw it to a blank TBitmap the size of my window with a solid color background. The problem with that is if you have a large screen, that's a rather large bitmap to be transitioning, so it's a little slow (I'm about to post a topic suggesting using the Graphics32 library to speed things up.) That way you'll never have anything left over from a previous image.
gavinnosler
Member

Posts: 3
Joined: October 22nd, 2004, 7:14 am

I supposed all images have identical dimension. However, when the OverDraw property is False, you can clear the entire client area as follow:

Code: Select all
procedure TMainForm.PicShowStart(Sender: TObject; Picture, Screen: TBitmap);begin  if not PicShow.OverDraw then    PicShow.Invalidate;end;

Kambiz

Posts: 2430
Joined: March 7th, 2003, 7:10 pm

I can't find the solution of this problem.

I want a transition between old pics ans new pics, so I keep overdraw=true.

However, when transition is complet, I want old pic to completely disappear.

Thanks again.
fabben
Member

Posts: 1
Joined: April 6th, 2005, 5:27 pm