Re: key to speed - use byte array instead of writing to locked image bytes
- From: James Maeding <jmaeding@xxxxxxxxxxx>
- Date: Fri, 26 Jan 2007 15:41:03 -0800
Bob, your site is so helpful, thanks for taking the time to organize and share all that stuff :)
"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxx>
|>The VB language doesn't support the use of _unsafe pointers_ so the
|>fastest method of access is not available to VB programmers.
|>
|>When using the Marshal class you don't use pointers, just indexes from a
|>given starting point.
|>
|>If you check out the article on LockBits you'll find a fairly
|>comprehensive description of the various memory buffer layouts for each
|>of the major graphic formats. Whatever method of access you use the
|>physical layouts remain the same.
|>
|>The apparent size of an image on disc may not have any correlation to
|>it's memory footprint. Images are decompressed to a rastar that holds
|>the whole image and so they will take up X*Y*bit-depth/8 bytes
|>regardless of the size on disc. A jpeg of a few hundred K may end up at
|>3-4-7 hundred megabytes after loading.
|>
|>A 750 meg TIFF might be ok as long as it was a simple format but TIFF is
|>such a huge spec that the GDI+ readers can't handle every different
|>form. It would also depend on things like total available memory and
|>swap-file size.
|>
|>There are no set rules i'm afraid.
.
- References:
- key to speed - use byte array instead of writing to locked image bytes
- From: James Maeding
- Re: key to speed - use byte array instead of writing to locked image bytes
- From: Bob Powell [MVP]
- Re: key to speed - use byte array instead of writing to locked image bytes
- From: James Maeding
- Re: key to speed - use byte array instead of writing to locked image bytes
- From: Bob Powell [MVP]
- key to speed - use byte array instead of writing to locked image bytes
- Prev by Date: Re: key to speed - use byte array instead of writing to locked image bytes
- Next by Date: Re: Non-proportional (non Rectangular) resizing
- Previous by thread: Re: key to speed - use byte array instead of writing to locked image bytes
- Next by thread: drawing a rectangle over an image
- Index(es):
Relevant Pages
|