Open picture 
Author Message
 Open picture

Hi,

I want to draw an XY-graph on a picture, this works fine i've made my XY
graph trancperant and put it on the foregroynd of my picture controle. The
pictures i have are grayscale, so they are 8-bit, but when i want to see 'm
i have to convert 'm to 24-bit otherwise i get very strange colors if i use
"draw 8-bit pixmap". Now when i use the 24 bit pixmap my whole application
slows down, because of the enormous calculations (i think), isn't there
anyway to read a gray scale pixmap or to increase the speed?

Best regards,
Thijs



Tue, 12 Oct 2004 19:20:16 GMT  
 Open picture

Quote:
> I want to draw an XY-graph on a picture, this works fine i've made my XY
> graph trancperant and put it on the foregroynd of my picture controle. The
> pictures i have are grayscale, so they are 8-bit, but when i want to see 'm
> i have to convert 'm to 24-bit otherwise i get very strange colors if i use
> "draw 8-bit pixmap". Now when i use the 24 bit pixmap my whole application
> slows down, because of the enormous calculations (i think), isn't there
> anyway to read a gray scale pixmap or to increase the speed?

When you draw an 8 bit image, there is an optional parameter for the
color table.  If not wired, it defaults to the LV color table, which is
pretty much like the HTML one, very colorful covering the entire
spectrum.  You will want to wire up the color values for those 256 pixel
encodings that are in your bitmap, otherwise LV has no way to interpret
them except to use our colorful lookup table.  The easiest way to make
your grayscale color table is to look from 0 to 255 making an array of
numbers that are (((i*255)+i)*255)+i.  If the image looks like a
photo-negative, then reverse the array or use 255-i in the above
expression where you see i.

Another way to speed this up is to use the panel property to Defer Panel
Updates.  Since you have multiple controls, there are times when your
display is correct, and probably other times when it is in transition --
one control is updated, but not the other, or attributes not set.  You
can avoid drawing the intermediate steps by turning on deferred updates,
setting the various values and properties, then turning the updates back
on by setting deferring to FALSE.  The property is obtained by getting
the panel reference from a VI property node, wiring that to another
property node, and selecting Defer Updates.

Greg McKaskle



Tue, 12 Oct 2004 21:23:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Open picture in Canvas by DragAndDrop

2. Open pictures

3. Opening pictures without saving to a file (http socket, etc.)

4. Open as Picture and Canvas control

5. Pictures and Picture Links in EditFields

6. picture and picture

7. Picture within a Picture Fade

8. Picture to String/String to Picture

9. Key In pictures and Pattern pictures

10. Putting transparent picture on another picture

11. Realbasic opens a window without a NewDocument event on opening the application

12. Closing an open browsebox when another browsebox opens

 

 
Powered by phpBB® Forum Software