473,654 Members | 3,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to copy multi-dim Array into IntPtr (or byte[])?

an external API that we're using is giving me back video data in a
multi-dimensional Array (not byte[], just System.Array). so, for an HD
quality video, the data is organized as [3][1280][720] of bytes. i know
this rather weird, but it's what i have to work with...

i've been reading thru Array.Copy and other related methods, but nothing
seems appropriate or efficient.

i'd rather not have to copy into a big byte[] array and them Marshal.Copy
that into an allocated IntPtr, but if that's what it takes, i'll have to do
it.

my biggest problem is i don't even know how to flatten the multi-dim array
into a byte[] array. optimally, i'd like to do it into one step into the
allocated IntPtr from the multi-dim array.

thanks for any help,
Kirk
Nov 17 '05 #1
0 1300

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2716
by: TDH | last post by:
Hi, I need to do a raw copy of a byte array to an Int16 array. For e.g., I have an byte array which has length 100, and I need to copy this to an Int16 array that has length 50. So 2 elements in the byte array gets copied to 1 element in the Int16 array. In VB6, this was easily done using CopyMemory. I need something in .NET that works as fast as CopyMemory. I
3
1660
by: PawelR | last post by:
Hello group, I've string :"A1 10 15 06 87 FF 10" etc. this are hex value of character. How convert this string to array of byte : System.Byte arrBytes = new byte; Thx PawelR
5
2476
by: shivaprasad | last post by:
Hi all, I am a Beginner to c#. I Need to convert array of byte data type to string. How to do this.. ex: byte bytes = new byte; this bytes get filled up. Now I need to convert to string.
0
1123
by: db | last post by:
I am new to vb. net, and would like to implement a method I used in vb6. I need to write binary data to the hard drive ASAP. I am writting ~ 5Mbytes of data (synchrously)every 5 seonds for several hours. I need to 'flush' the data to the hard drive after each write so that I can respond to events in a 'real time' manner during the next 5 second of data collection. In vb6 i used Public Declare Function WriteFile Lib "kernel32"...
6
1721
by: Nils Wolf | last post by:
hi, how do i convert an integer array to a byte array??
0
2328
by: sebascomeau | last post by:
Hi everyone, Hello my name is Sebastien and I need some help. He have one week past and I search to do one thing but I can't. If someone help me, I'll be so happy :). My problem is I want to upload a file(image), convert this image in an array of byte. Take this array and pass it to a web service. The web service take this array of byte and resize the image and return a new array of byte. This new array can be save on the harddrive. I...
1
19189
by: Elioth | last post by:
Hi... I need to know how to convert Char Array to Byte Array and vice-versa in VB 2K5 Thanks for all help. Elioth
3
6380
by: reju | last post by:
I have to convert an sByte array to byte array. This sbyte array contains some signed values due to this .net converting functions will throw an exception.any work around for this? is there any way to pass sbyte array to stream classes eg: memory stream?
3
2437
by: cmdolcet69 | last post by:
I can the following error message "value of type byte cannot be converted to 1-dimentional array of byte" when i execute this line of code: moRS232.Write(Packet(i)) it underline the packet(i) this is my declared array of byte size (6)
18
43044
by: MrVS | last post by:
Hi, I have a C++ CLR class method that takes System::Byte *b as parameter argument. I want the CSharp caller pass a byte * to this function. But in the CSharp prorgram, I only managed to create a byte array (byte). Can anyone tell me how to convert byte array to byte pointer in CSharp? Please show me an simple example about how to do it. Thank you for your help
0
8372
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8706
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.