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



On 10 Dec 2006 23:27:49 -0800, jimbo@xxxxxxxxxx wrote:


J French wrote:
On 10 Dec 2006 09:44:17 -0800, jimbo@xxxxxxxxxx wrote:

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

Can Delphi do this?

Any language can - we are just manipulating bytes.

How can one cache a folder say on a cd or external device? Example?

Well really caching is just reading and remembering the files, it is
not much use if you don't read the same file more than once.

<snip>
My program is a kiosk for viewing and ordering digital images and is
reading external drives so the program is always working from cd or usb
that's why the premium on loading large images. Cameras are producing
larger photos. Media can hold hundreds of photos. I have to display a
reasonable sized image for inspection so when the thumb is clicked I
load from the media.

Right, so the photos are all different, that rules out caching.

Sorry. Still confused.

If you are just reading the file once, then 'remembering' it is not
going to help much.

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

Sorry you've lost me there. Can I preload a whole bunch of images that
way? Do you have a piece of code? Does it achieve the same thing as
cacheing? Thanks for staying with me. Sorry about all the questions.
I've searched for delphi + cache but everything was .net or internet
related.

I can think of some devious ways of making things run faster.

I'm all ears.

How about kicking off a separate App that generates the thumbnails in
the back ground, that way you'll be using the processor while the user
is twiddling with the mouse.

Since you have a FileListbox there is a limited number of files that
can be selected at any point in time.

A few questions :-
How do you know the names of the JPEGs that you want to display ?

User chooses folder from directorylistbox populating a filelistbox.
I create an object for each entry with path and other relevant info and
add it to an array with a common index to the filelistbox. So I use
whichever is convenient.

Where exactly are those JPEGs coming from

CD USB or any external drive.

How long do you want to keep the JPEGs

In practice only long enough to assign it to the larger TImage. I free
it immediately. See original example.

If you are doing a security camera control system then explain what
you want.

No as I said it's a digital photo kiosk for use in photo retail shops.
Reading large images from cd or usb is borderline acceptable only
because it represents a small percentage of users right now but I
expect the pct to increase and hope to solve this some way. I have an
absolutely magic solution for thumbnail generation and feel I can
market if I can speed up showing of the larger image. I originally was
generating thumbnails at 400x300 with reasonable speed thereby solving
the problem of the larger picture since I already had it on the
harddisk. But when I hit 4MB it became unacceptable. That's how I found
my current thumbnail solution so I'm back to the original problem. At
this stage the only impediment is loading the larger TImage from
external media on clicking the thumb. It needs a bit of a prod. French
dressing? :) RamDisk?

Could you explain the 4mb
- do you mean that a 4mb file is slow to load ?

If that is the case, you could try reading the entire file into a
memory stream and then use LoadFromStream
- I'm not sure, but it could cut down on physical disk reads

Thanks again for staying with me.


.



Relevant Pages

  • To what device group does an intelligent frame grabber fit?
    ... I am just about to start reading the basics about ... windows drivers just a question about ... On the card, a dedicated processor is grabbing and evaluating the ... Also single images can be grabbed. ...
    (microsoft.public.development.device.drivers)
  • Re: Opinions on author websites?
    ... backgrounds, images and dividers, reading pages built the old-fashioned ... A freebie poster download for your upcoming book (maybe0 ...
    (rec.arts.sf.composition)
  • Re: Opinions on author websites?
    ... backgrounds, images and dividers, reading pages built the old-fashioned ... reading them - a quick glance tells you all you need to know. ...
    (rec.arts.sf.composition)
  • Re: Static factory method doesnt work -- non-static does!
    ... >> with extreme caution. ... What does 'reading' mean? ... I only read Penthouse for the articles - I browse ... http://www.LensEscapes.com/ Images that escape the mundane ...
    (comp.lang.java.programmer)
  • Re: Website review sought - comments invited
    ... jewellery and for ease of access it is now available through ... The thumbnails load first and you get to see them. ... While you are looking at the thumbnails, the bigger images are ...
    (rec.crafts.jewelry)