Visual Basic/VB >> Capacity of an array with picture objects

by giannis » Fri, 10 Oct 2003 02:58:40 GMT

I have an array of StdPicture elements
(with this: array(n)=LoadPicture(<an image file>))
How mutch pictures can i load in this array ?
How can count the size of an array?
Is there a kind of "big" arrays that can hold
very images?




Visual Basic/VB >> Capacity of an array with picture objects

by alpine » Fri, 10 Oct 2003 03:19:57 GMT


On Thu, 9 Oct 2003 21:58:40 +0300, "giannis"




You are limited to available memory on the system on which your
application is running. The easiest thing for you to do will probably
be to handle the out of memory error that will occur when the limit is
exceeded.

HTH,
Bryan
____________________________________________________________
New Vision Software "When the going gets weird,"
Bryan Stafford "the weird turn pro."
alpine_don' XXXX@XXXXX.COM Hunter S. Thompson -
Microsoft MVP-Visual Basic Fear and Loathing in LasVegas



Visual Basic/VB >> Capacity of an array with picture objects

by giannis » Fri, 10 Oct 2003 03:50:53 GMT

The size of the array is the sum of the files size ?








Capacity of an array with picture objects

by Albert Reid » Fri, 10 Oct 2003 04:02:17 GMT

My guess is that the memory usage would be larger than the file size due to
JPEG compression. I don't think you can know the memory usage in advance of
loading them.

BTW, why do you want to hold all of the images in memory?

Al Reid










Capacity of an array with picture objects

by Larry Serflaten » Fri, 10 Oct 2003 04:13:26 GMT

"giannis" < XXXX@XXXXX.COM > wrote

Unless you are worried the filenames are going to change
while your program runs, could you not just collect the names
and then load the pictures when they are needed?

LFS




Capacity of an array with picture objects

by giannis » Fri, 10 Oct 2003 04:19:08 GMT

I have make an album with pictures and i have store in a
database only the paths of files.
When i must see the pictures in the multiple pages of the album,
there is very delay when you want to load all these pictures
every time that you want change a page of the album.....




to
of









Capacity of an array with picture objects

by giannis » Fri, 10 Oct 2003 04:22:54 GMT

I have made an album with very pages and when
i browse these pages there is very delay load
eatch time the pictures for eatch page.






Capacity of an array with picture objects

by Rick Mogstad » Fri, 10 Oct 2003 04:28:09 GMT

perhaps only load 3 pages at a time, maximum. Load the current page, the previous page, and the
next page. Then when you change pages, there is no delay, because you are loading another image,
not the one you are viewing.















Capacity of an array with picture objects

by giannis » Fri, 10 Oct 2003 04:29:59 GMT

Can I use a temp table of the database to hold all these
picture objects and in witch kind of field ? (OLE?)






Capacity of an array with picture objects

by Albert Reid » Fri, 10 Oct 2003 04:32:02 GMT

I don't know, maybe it's me, but I just don't understand why you want to
preload all of the images. Perhaps a strategy of preloading a page ahead
and caching a page behind could work. It seems to me that you could launch
the program, go to lunch and come back just as it finishes loading the
images.

If it was me, I would take a step back, take a deep breath and give the
whole design a good and thorough re-thinking.

Just my opinion, though.

Al Reid





advance





probably
is




Capacity of an array with picture objects

by Albert Reid » Fri, 10 Oct 2003 04:33:34 GMT

No sooner do I hit send with a similar thought and your post appears. You
are fast ;^)

Al Reid




previous page, and the
loading another image,




due
advance





probably
limit is




Capacity of an array with picture objects

by Albert Reid » Fri, 10 Oct 2003 04:35:50 GMT

giannis,

Just how many pictures are you looking at and what database do you have (I
won't say own)?

Al Reid









Capacity of an array with picture objects

by giannis » Fri, 10 Oct 2003 04:43:44 GMT

The pictures maybe are 100,200,500....
I use a .mdb database with the paths of files
and the albums names.










Capacity of an array with picture objects

by giannis » Fri, 10 Oct 2003 05:29:00 GMT

When must I load the the next array ?
When i load an array the program stop until load the next array.


previous page, and the
loading another image,




due
advance





probably
limit is




Capacity of an array with picture objects

by Rick Mogstad » Fri, 10 Oct 2003 05:38:52 GMT

es, but your page will be displayed while the next one is loading. The way i see it, you have 3
options


1. Load all the pictures at the beginning. Might as well only use the program right before you
plan to go to bed, it should be up by morning.


2. Load the pictures by page, as they get to the page. They will have to wait for the page to
load on each page.

3. On Startup Load 2 pages, page1 and page2. When they change to page2, move the currentpage
array to the previouspage array, move the nextpage array to the currentpage array, and display the
pictures for the current page. Then fill the nextpage array again with pictures for page3.





"giannis" < XXXX@XXXXX.COM > wrote in message
news:% XXXX@XXXXX.COM ...




Similar Threads

1. Maximum Capacity for a Dictionary Object

Hello,

Is there a maximum capacity for a Dictionary object when implemented
in a VB 6 DLL?

In my application, I seem to be "maxing out" at a little over 32,000
entries.  This seems first, like an odd place to limit and second,
completely undocumented anywhere that I can find.

At this upper level, the DLL starts generating "overflow" messages. 
In our log file:  Nov-16-2006 15:30:24: ActiveX: Overflow

Not very explicable, unfortunately.

Thanks.

mp

-- 
'cat' is not recognized as an internal or external command,
operable program or batch file.

2. PowerPoint VBA - Picture Object, OLE Object file extension, type, or format

3. Passing Object Array back to Variant array.

Hello,

I am having trouble upgrading my VB apps to .net.  When i started at
my company there was a dll created here in vb6, and i need to use that
dll for many functions that would take too much time to re-create for
the limit that i am given.  I have to create a new app in .net, per my
instructions, but the dll uses variant arrays, and i keep getting an
error whenever i pass an object array from my .net app to the vb6 dll
which needs to receive a variant array.

The error "Specified array was not of the expected type." always
occurs.  I do not know what else to do besides going into the dll
(which i have been told specifically not to touch as of this time
since there are too many other apps that use it.)

Any help in this matter would be greatly appreciated.

Thanks,
Chris

4. Casting an Array of Objects to a typed Array - VB.Net

5. list of objects vs Array of objects

Hi

Can anyony please tell me why I should use a List of objects instead of an 
array of objects ?

Thanx

John



6. Creating an array of objects when the object type is not known at design time - VB.Net

7. object w/collection of objects that contain arrays

Hi,

I have a primative object oPrim of type cPrim
w/properties of docName as string, lineNumbers() as integer

I have an analysis object oAnal of type cAnal
w/properties of docNames() as string, colAnalDocs as collection, and a
method mParseDocs of type bool
The method populates the collection colAnalDocs with objects of type
cPrim:

public colAnalDocs as collection
for ii = lbound(docNames) to ubound(docNames)
	set oPrim = new cPrim
	oPrim.docName=docNames(ii)
	'macro stuff returning line number array
	oPrim.lineNumbers = returned_macro_stuff
	colAnalDocs.add oPrim
next ii

My app creates the analysis object:

dim oAnal as cAnal
dim bOK as bool
set oAnal = new cAnal
oAnal.docNames(1) = "blah.doc"
bOK = oAnal.mParseDocs

In my app, when I loop thru the lineNumers, I get the following
errors:

dim oPrim as cPrim
for each oPrim in oAnalDoc.oPrim
	db.print cstr(oDoc.lineNumbers(0)) 'wrong number of arguments or
invalid property assignment
'or
	dp.print cstr(oDoc.lineNumbers) 'type mismatch

next oPrim

Using the locals window, I see the may oPrim is of type cPrim/cPrim
but drilling into oAnalDoc, it's variant/Object/cPrim.
Note that I can access the other properties of oPrim just fine.

Help appreciated.

-Chris

8. hard disk capacity in vb.net - .Net Framework