and I'm gettign this error: Cannot implicitly convert type 'System.Collections.Generic.List<byte>' to 'System.Collections.Generic.List<ushort>'
Matias
unread,
Aug 11, 2013, 8:22:42 PM8/11/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fo-d...@googlegroups.com
I got the Pixel Data of a 16 bits image.. Here's the code:
List<ushort> pixels16;
.... byte[] bytes = img.PixelData.GetFrame(0).Data; int count = bytes.Length / 2; ushort[] words = new ushort[count]; for (int i = 0, p = 0; i < count; i++, p += 2) { words[i] = BitConverter.ToUInt16(bytes, p); } pixels16 = words.ToList();