473,695 Members | 2,278 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

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,
Nov 17 '05 #1
0 1307

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

Similar topics

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
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
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.
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"...
by: Nils Wolf | last post by:
hi, how do i convert an integer array to a byte array??
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...
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
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?
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)
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
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...
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,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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...
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.