• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 
23 November 2024, 13:28:53

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - wp

1
Simple math: if the true size of the insect is S(cm, ins), the true size of the dime S(cm, dime), the pixel size of the insect S(pixels, ins), and the pixel size of the dime is S(pixel, dime) then

S(cm, ins) = S(cm, dime) * S(pixel, ins) / S(pixel, dime)
2
You are right, I am using Avira, and my upload of D3DDemo.exe to virustotal.com confirmed that Avira is the only scanner to report an alarm among 40 scanners.
3
Thank you for that long-awaited new version. Unzipping the download, however, I get notified that the exe files are infected by the Delphi virus (DR/Delphi.Gen).
4
Strange...

My test TIFF picture is loaded by IrfanView (v4.23) within 1.3 s (as displayed in their image info dialog). My own, vampyre-based program needs about 2.2 s for loading plus about 0.2 s or 0.4 s for shuffling into a TImage or TImage32, respectively (from the Graphics32 library). The 2.2s for loading are unchanged when I use the low-level, high-level or VCL interface.
5
Help & Questions / Speed and memory usage
12 May 2009, 21:35:54
I have to deal with pretty large TIFF files (some 100 MB). This is my code to load an image:


type
  TMainForm = class(TForm)
      ...
  private
    FImg : TSingleImage;
    {$IFDEF USE_GR32}
    Image32 : TImage32;
    {$ENDIF}
    procedure LoadFile(AFileName:string);
       ...
  end;

procedure TMainForm.LoadFile(AFileName:string);
var
  T : int64;
  imgbitmap : TImagingBitmap;
  success : boolean;
begin
  success := false;
  T := ImagingUtility.GetTimeMicroseconds;
  FreeAndNil(FImg);
  Screen.Cursor := crHourglass;
  try
    FImg := TSingleImage.CreateFromFile(AFileName);
    if FImg <> nil then begin
      imgbitmap := TImagingBitmap.Create;
      try
        imgbitmap.Assign(FImg);
        {$IFDEF USE_GR32}
        Image32.Bitmap.Assign(imgbitmap);
        {$ELSE}
        Image.Picture.Assign(imgbitmap);
        {$ENDIF}
        success := true;
      finally
        imgbitmap.Free;
      end;
    end;
    ...
  finally
    Screen.Cursor := crDefault;
  end;
end;


Is this the fastest way to load an image? I observe that IrfanView is able to open the same images considerably faster. In my program I used the high-level VCL interface, is it faster to use the low-level routines instead?

A related question concerns memory usage. What is the best practice to avoid multiple memory allocations and copy operations?

6
TIFF, JPEG, PNG, BMP
7
Help & Questions / Load and save progress
12 May 2009, 11:02:46
Hi

I have some large pictures where loading and saving takes some seconds and would like to display a progress bar. Can this be done somehow?

Werner
SMF spam blocked by CleanTalk