473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to combine byte array and save to a file?

kee
Hi All,

I am trying to figure out on how to combine 2 byte array and save to a file.

e.g.
open "image001.bmp" for binary access write as #1
put #1,,x() & y()
close #1

notes : x() and y() contains bitmap binary data.

Appreciate any helps.

Kee

Jul 17 '05 #1
1 9478
On Fri, 26 Mar 2004 17:57:13 +0800, kee <ke***@kee.dynu.com> wrote:
Hi All,

I am trying to figure out on how to combine 2 byte array and save to a file.

e.g.
open "image001.bmp" for binary access write as #1
put #1,,x() & y()
close #1

notes : x() and y() contains bitmap binary data.


Private Sub Command1_Click()
Dim B1() As Byte
Dim B2() As Byte
Dim Channel%, L9&

ReDim B1(1 To 5), B2(1 To 20)
For L9 = 1 To 5
B1(L9) = Asc("0") + L9
B2(L9) = B1(L9)
Next

Channel = FreeFile
Open "c:\t\test.dat" For Binary Access Write As Channel
Put #Channel, , B1()
Put #Channel, , B2()
Close #Channel

End Sub

I am a bit puzzled where you got those BitMaps
Jul 17 '05 #2

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

Similar topics

9
by: Sharon | last post by:
I'm trying to convert an Image file to a byte array . Later in my code I'm trying to create a new Image from this byte array as a restored Image. But when I try to save the restored Image to a...
6
by: Luis Arvayo | last post by:
Hello, I am trying to convert a jpeg image stored in a PictureBox to a byte array in order to later save it to a database, but I get this error : "Generic Error in GDI+". The source code is...
1
by: Sharon | last post by:
I have 2 questions that are just the opposite to one another: (1) I need to read an image file (like bitmap, jpeg etc.) and to save only its data, I need to save his data in a raw data format,...
8
by: frekster | last post by:
Hi. I used to be able to do this easily in vb 6 via looping and preserving the source array data/size etc. How can I do this in vb.net? I've been trying for a while now and this should be...
4
by: Nicolas | last post by:
How do I open a file which is saves into the database as byte() So far, I got this and it's working Dim myDoc as Byte() myDoc = CType(dbDataRow("Document"), Byte()) From there how do I open...
2
by: Chris | last post by:
How do I save an array of bytes to a file? I am binding a update parameter to a fileupload control. It passes the file to my object as a Filebytes datatype. I am assuming it is just an array of...
2
by: chris | last post by:
I have a few byte arrays that I would like to combine into one array (order needs to be kept). What would be the most efficient way to do this? Thanks for your time, Chris
0
by: lovecarole | last post by:
hi, i am the student who should write a program about reading wav file and do the DFT. actually i don't know how to read data of the wav song and save it into the array... if i want to read...
1
by: | last post by:
Hi all, I am writing a sendmail milter application in Java. The incoming mails will usually have image file as attachments. My application is currently able to extract the ImageFile and save it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.