TStringGrid Image Preview

TStringGrid Image Preview

Post by Spectr » Sat, 13 Feb 1999 04:00:00



Hi,
What is the best way to create an image preview? In other words make and
display image thumbnails? I'd like for the user to select a directory,
and have the option of displaying the image files and filenames in that
directory in a TStringGrid. I've read a few things about creating a
Tbitmap, using it to temporarily store the image file,  adding it to the
StringGrid, and also saving it as a thumbnail size image file. Due to
the overhead, I would rather not use a database to store the thumbnails.
Can I drop a non visible image component on the form, use it to create
the image file, and store the thumbnail in a dat file or Ini ? Once the
thumbnail images are created, and the user returns to the directory,
there must be a way to display the files and filenames in a TStringGrid
graphically just as a filelistbox displays them with text, without
having to reload them from a data file. A good example of this is
Photodex's  CompuPic Image viewer (www.photodex.com). Any advice or code
example to point me in the right direction would be greatly appreciated.

Thanks,
Rick

 
 
 

TStringGrid Image Preview

Post by Davie Ree » Wed, 17 Feb 1999 04:00:00


Personally you could use TreeView or TListView or you could roll your own
component. Load the list with all the filenames you want to keep track of
and then trap the ondrawitem events to get the thumbnail image that you
built and stored somewhere. Use a temp file. I use this method and can hold
about 40,000 in my list. I can have designed it to be able to load over
64,000 images.

======= R A L P H   F R I E D M A N =========
Please don't remove this post becuase I am just trying to help this
guy out. I know
it doesn't qualify for this "GRAPHICAL" newsgroup but I thought what
the heck I
would answer him anyway cause I'm such a nice guy!
=====================================
Davie


> Hi,
> What is the best way to create an image preview? In other words make and
> display image thumbnails? I'd like for the user to select a directory,
> and have the option of displaying the image files and filenames in that
> directory in a TStringGrid. I've read a few things about creating a
> Tbitmap, using it to temporarily store the image file,  adding it to the
> StringGrid, and also saving it as a thumbnail size image file. Due to
> the overhead, I would rather not use a database to store the thumbnails.
> Can I drop a non visible image component on the form, use it to create
> the image file, and store the thumbnail in a dat file or Ini ? Once the
> thumbnail images are created, and the user returns to the directory,
> there must be a way to display the files and filenames in a TStringGrid
> graphically just as a filelistbox displays them with text, without
> having to reload them from a data file. A good example of this is
> Photodex's  CompuPic Image viewer (www.photodex.com). Any advice or code
> example to point me in the right direction would be greatly appreciated.

> Thanks,
> Rick


 
 
 

TStringGrid Image Preview

Post by Anders Isakss » Thu, 18 Feb 1999 04:00:00




<snip>

Hey, Davie, cut the *and keep to the subject!
------------------------------------
Anders Isaksson, Sweden

BlockCAD: http://www.veryComputer.com/~hbh828t/proglego.htm
Gallery:  http://www.veryComputer.com/~hbh828t/gallery.htm

 
 
 

1. changing image into a TStringGrid cell

Hi there,
I drawn a little image into a TString Grid. Here is my code:

procedure TForm1.StringGrid1DrawCell ( Sender: TObject; ACol, ARow: Integer;
                                       Rect: TRect; State: TGridDrawState );
begin
  if (ACol = 0) and (ARow = 1) then begin
    with Sender as TDrawGrid do
      ImageList1.Draw(Canvas,Rect.Left+2,Rect.Top-1,0);
  end;
end;

This works fine. My question is: how can I change the image? What is the
best way to do this? Consider DrawCell event doesn't necessary fire.
Thx
Bombi

2. Lightwave polygon problem

3. Preview .EPS files stored without preview?

4. TRADE 3DMax2 plugins

5. Mac EPS (PICT preview) to PC EPS (TIFF preview)

6. fillet blend tool

7. Preview .EPS files stored without preview?

8. Looking for Texture/Bump map

9. Please help???Tiff preview on EPS images???

10. Pict preview for a EPS image.

11. Dreamweaver placeholder images are visible in preview

12. Preview of images on Macs