PicShow and resize currently shown image

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

PicShow and resize currently shown image

Postby mhieta » November 16th, 2005, 8:10 pm

Hi,

Firstly thanks for great component.

Is there anyway to resize currently shown image?
I'm currently resizing image in "LoadNext" function. Like this way:
Code: Select all
    if CreateCustomButton1.Enabled = True then  //if custom show is enabled then load images from there.
    begin
      P := TPicture.Create;
      try
        P.LoadFromFile(PicPath + LoadedImage);
        CopyGraphicToBitmap(P.Graphic, PicShow.Picture.Bitmap,
          PicShow.Width, PicShow.Height, True);
      finally
        P.Free;
      end;
    end;

So if user resizes window then he/she gets resized picture after one loaded picture.
mhieta
Active Member
Active Member
 
Posts: 23
Joined: November 16th, 2005, 7:58 pm

Postby Kambiz » November 17th, 2005, 10:16 am

You can set both Stretch and StretchFine properties to True, and load the image as follow:

Code: Select all
      P := TPicture.Create;
      try
        P.LoadFromFile(PicPath + LoadedImage);
        CopyGraphicToBitmap(P.Graphic, PicShow.Picture.Bitmap,
          Screen.Width, Screen.Height, True);
      finally
        P.Free;
      end;
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby mhieta » November 17th, 2005, 6:42 pm

hmm. I forget to tell that i'm using PicShow 3.12 with graphics32 1.7.1.
If i use that Stretch property then i'm getting this "error": Source rectangle is invalid. And that is pointing to graphics32 code. So whats next? :)
mhieta
Active Member
Active Member
 
Posts: 23
Joined: November 16th, 2005, 7:58 pm

Postby Kambiz » November 17th, 2005, 9:38 pm

I don't know about Graphics32.

As an idea: when you need to reload the image, show it without any transition effect.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby mhieta » November 18th, 2005, 3:54 pm

Ok, thanks for the tip. It seems that i have to update graphics32 in to latest version and hope that it fixed there.
mhieta
Active Member
Active Member
 
Posts: 23
Joined: November 16th, 2005, 7:58 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron