Hi,
Both solutions you suggested can do the trick, but only inside a for loop - and I need to cast the byte array to short array in one command, since it's very long array....
User Profile
Collapse
-
convert byte[] to short[] in C#
Hi all,
I need to perfom simple-looking task in C#: Converting byte array to short array - meaning that if my byte array has 100 cells, my short array will have 50 cells.
If it was C/C++ it was simple, using pointers. However in C# I just can't do it - I've already tried using 'unsafe' block and memory pinning using GCHandle, with no success.
Another thing that bothers me in the solutions I found is that... -
Loading and using image from binary file
Hi all,
I have a flow of things I need to do, and by now I couldn't find a covenient (or any) way doing it:
1. Loading image from binary file. The image is a 3D image, and I know each slice dimentions. Each pixel in this picture is of type Int16 (2 bytes per pixel).
2. Now, I need to set the 'Image' property of my PictureBox to one of my image slices (let's say the first one).
I'll be grateful... -
Give focus to multiple controls
Hi all,
My main application form occupies two listview controls.
Whenever I select a line in one of the listviews, I lose the selection of the selected line in the 2nd listview.
The solution of setting the 'HideSelection' property to 'true' is not good enough since I want the selected lines in both listviews to be colored blue, not grey.
Any suggestions?
Thanks a lot,
...
No activity results to display
Show More
Leave a comment: