Hello all,
I am trying to work with jpegs using the professional labview
development system (v6.0.2). My difficulty is in getting an image out
of a picture object and back on to disk without distortion!
I have read a jpeg image from disk and modified it before displaying it
in a picture indicator. I want to write the modified image to disk; the
image needs to be flattened so it can be sent to the "write jpeg to
disk" subvi. I am invoking a node for the picture indicator, then using
its "Get Image" method to return the data I need. I then wire this up
to the "write to jpeg" subvi. This works, kind of. The problem is that
somewhere, seemingly in the method itself, the colors are being
remapped.
If I look at the image after
it's been read from disk, it looks OK. I
can modify it in various ways and it looks ok. But when I flatten it
using the "get image" method, the color table changes to what looks like
4-bit color. I have graphed the original color table (provided by the
"read jpeg from disk" subvi) against the color table generated by the
"get image" method, and they are significantly different. The original
color table looks like noise, the new one looks like steps. This
happens even when I change the technique I'm using to grab the image,
such as using VIs found on the net for just this purpose ( the "get
flattened pixmap" vi on http://labview.brianrenken.com/downloads.shtm ).
What's going on? I'm using windows 2000 on a system with an otherwise
functional 24-bit display system. Thanks in advance for your help!
---------------------------
Dan Greenspan
Mail Stop 14-707M
Johns Hopkins University
Applied Physics Laboratory
11100 Johns Hopkins Road
Laurel, MD 20723-6099
240-228-7490
daniel.gre
enspan@jhuapl.edu
---------------------------