Re: Once and for all! Fastest way to load large jpeg



On 10 Dec 2006 00:55:59 -0800, jimbo@xxxxxxxxxx wrote:

Thanks to those who replied.
<snip>
I would scratch using the File size and use the Height and Width
properties exposed by TJpegImage
Your right of course. I'll change that.

Any suggestions as to cacheing/using API calls/streams that could speed
up loading or am I pretty much utilizing what Delphi has to offer ?

Delphi is pretty close to the APIs
- a fairly lightweight wrapper

Streams of themselves would not help much, LoadFromFile is just
LoadFromStream with an added FileOpen and FileClose.

Caching would make quite a difference if you are continuously showing
the same images - it might be a bit memory heavy.

IME the really expensive thing about disk access is locating and
opening the File - if one can find a way of just having one open file,
partioned with a way of getting at individual 'records' then you
should get a massive jump in performance ( well I've always found so
in the past - but hardware is steadily improving ).

I once wrote something like that, it stored 10,000 pages of HTML with
Images in just one file - even running from CD it was pretty snappy.

You could do a bit of profiling, say pre-loading images into an array
of Strings and getting at them via a TStringStream.
.



Relevant Pages

  • Re: WM_COPYDATA
    ... and well-suited for sending images. ... Delphi does not handle objects and pointers much at all. ... original contact from the receiver. ... orthogonal commands. ...
    (comp.lang.pascal.delphi.misc)
  • Re: WM_COPYDATA
    ... and well-suited for sending images. ... Delphi does not handle objects and pointers much at all. ... Passing an object to a function passes it by reference. ... orthogonal commands. ...
    (comp.lang.pascal.delphi.misc)
  • ANN: TRichView 10.0 - rich text editor component
    ... TRichView is a set of native Delphi ... components for editing documents with tables, images and hyperlinks. ... The main new features: ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Once and for all! Fastest way to load large jpeg
    ... Any suggestions as to cacheing/using API calls/streams that could speed ... up loading or am I pretty much utilizing what Delphi has to offer? ... Delphi is pretty close to the APIs ... Images in just one file - even running from CD it was pretty snappy. ...
    (alt.comp.lang.borland-delphi)
  • Re: Scrolling listview untill the selected item is in sight
    ... open file and all of that - - - ... Oh, you can do that in Pascal, and Delphi is still Pascal. ... I saw a question somewhere for an explorer-style treeview-listview ...
    (alt.comp.lang.borland-delphi)