Hi guys,
I'm currently doing a J2ME application that gets a JPEG image and sends it's bytes to a C# server via sockets. In the J2ME application, I can re-convert the bytes I sent to an Image and view it. On the server side, however, the SAME bytes cannot create an image using Image.FromStream() Method. Is there some meta-data I need to include to successfully create an Image in C# created from Java?
Rombosia
0
Newbie Poster
Recommended Answers
Jump to PostHere's the code I use without any problem when passing byte arrays back and forth from java to c#
//Assign these some values byte[] byteImage; string savePath; FileStream fileStream = new FileStream(savePath, FileMode.Create); //attempts to write file to local machine fileStream.Write(byteImage, 0, byteImage.Length); fileStream.Close();
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.