Hi rberger,
When a bitmap is stored in memory it is basically stored as a one-dimension array without rows and columns. Therefore, when you specify that your image is only 638 pixels wide, you are not telling LabVIEW to cut off the last two pixels in each line, but simply to divide the bitmap (1D-array of pixels) in portions (lines) of 638 pixels each. Therefore you will see pixel number 639 and 640 in the beginning of line two etc.
A similar behavior happens when you are trying to read multi-dimensioned arrays from a file. In the example that you attached, you need to specify the number of rows and columns in the array. Since the data is saved as a 1D-array, your choice of rows and columns will simply tell the Read File function how to interpret the data in the file.
If you want to perform a true subset of your 2D data, you should use the functionality of the Array Subset function. Using that function you can choose exactly what part (subset) of the 2D-array you want to extract. Please see the attached
ArraySubset.vi for a simple array example. I also attached an example called
CropSave.vi that performs the subset function on a pixmap.
Have fun!
Message Edited by Philip C. on 06-06-2005 12:39 AM
- Philip Courtois, Thinkbot Solutions