Re: picture control pset performance?

Tech-Archive recommends: Speed Up your PC by fixing your registry



On Tue, 21 Nov 2006 12:05:36 -0800, Karl E. Peterson put fingers to
keyboard and said:

Bruce Bowler wrote:
This code seems to take an inordinately long time. Any
suggestions on how to make it faster? Alternately, is there
a better way to accomplish what the above does, namely,
take buffer, which is in fact a gray scale image, and display
it at a 50% reduction

There are all sorts of ways to do it, depending on exactly where you
are getting the original image from and what you want to eventually
do with the resized image. Generally, for resizing images you are
usually far better off using a "one off" call to a suitable function
rather than manipulatng the individual pixels directly. You could
use the VB PaitnPicture method or the API StretchBlt or
StretchDIBits method, again depending on exactly what it is you want
to do.

I'm not sure what part wasn't clear, so let me try again, more simply.

I have a byte array that I want to display as an image at 50% on a VB
form. Period. End of sentence.

It shouldn't matter where (or how) I got the image and it shouldn't
matter what I want to do with the data later.

Maybe it shouldn't, but (Mike's the expert) I suspect it does. At least if
you want the most optimal performance. That said...

OK, I'll explain where I get the data and what gets done with it.

I get the data from a camera attached to a microscope (although ANYTHING
that generates a 1392x1040 byte array will do -- even a random number
generator). I massage it a bit, and I write it as a TIFF file (using a
*REALLY* ugly hack) at full resolution, and display it at 50% resolution
so the user can see what's going on. then (as they say on the shampoo
bottle) "lather, rinse, repeat"

Now, PLEASE explain to me why any of that matters...

Bruce

--
+-------------------+---------------------------------------------------+
Bruce Bowler | I want to die peacefully in my sleep like my
1.207.633.9600 | grandfather, not screaming in terror like his
bbowler@xxxxxxxxxxx | passengers - Anon
+-------------------+---------------------------------------------------+

.



Relevant Pages

  • Re: How do I add a .tif picture to a web page?
    ... resolution doesn't really matter on the web- ... > it is the overall dimesions that are displayed ... Resolution on the web is by default the resolution of your ... So - is the TIFF file for DISPLAY on the web, ...
    (microsoft.public.frontpage.client)
  • Re: initial worksheet formats
    ... Is the row height simply a matter of resolution? ... If your display is set to ... Prev by Date: ...
    (microsoft.public.mac.office.excel)
  • multi-resolution environment
    ... expands itself to full-screen, no matter what resolution ... I have a client where one worker always sets her display ...
    (microsoft.public.access.setupconfig)
  • Re: 1080i on a 1280x720 naitive resolution HDTV?
    ... resolution display a 1080i picture in it's entirety? ... HDTV's out today that have a native resolution of 1280x720 say they can ... different matter than having a particular value for native resolution. ... only way to avoid resampling in the vertical is to have a true multisync CRT ...
    (sci.engr.television.advanced)
  • Re: Digital Osci and Logic Analyzer
    ... The higher sampling rates of the examples you ... would the o'scope display at 1 usec/div'n? ... time soon) and I have a probe that works properly with the ADC. ... however many samples are collected at whatever resolution ...
    (sci.electronics.design)