Hi Kostya, To be honest,i was waiting for your reply.I have seen a lot of your replies here related to data sending on network.Actually,my scenario is that i am making my HTC desire as server and my PC as client.I start my camera on HTC desire and then gets frames in the form of byte[] from on onPreviewFrame method.
Now after some processing on this byte[],i write that processed byte[] on two streams. 1-On file stream to write that on my SD card as JPG image and it creates very fine image. 2.I am sending the same byte[] through TCP to my PC and writing that byte array as JPG file.But it create a whole black image.When i open both of these images,i mean one from sd card and one from my PC.Only first 40 bytes are same and then rest are totally different.Moreover,there is more data on JPG file which i have written on sd card than the one that i received on my PC. One other thing that i guess i must mention is that,if i read already written image on my SD and send that image from my HTC desire to my PC through TCP.It works just perfect.Thing is i dont want to write that image before on my SD card and then send to my PC.I want to send that image directly to mY PC. Oh one more fact,If i do all the above process with by half of my byte[](offcourse it will not create a valid image),then instead of just 40 byte,the whole data is same at both end.I mean on SD card and on my PC.Yeah both are whole black but atleast they have same data. Please help.i am just stuck into this.I can post my code here if you want. best regards, ZZ On Dec 22, 2:13 pm, Kostya Vasilyev <kmans...@gmail.com> wrote: > Sounds like you have your own server, and seems like bug is possibly there. > > Modify your Android code to do both: write to the memory card *and* send > to the server. Then compare the files you get on the phone and on the > server. > > -- Kostya > > 22.12.2010 16:03, ZeeZo пишет: > > > I am done with that part Sarwar before my last post.I can successfully > > write the JPG image on my sd card.But now problem is that when i > > transfer my processed byte[] to my PC through TCP,it writes a whole > > black image.I don't know if its some kind of compression issue or > > what. > > > On Dec 22, 5:46 am, Sarwar Erfan<erfanonl...@gmail.com> wrote: > >> Oh, forgot to mention, before you use setPreviewFormat, use > >> getSupportedPreviewFormats() method to determine whether your phone camera > >> supports ImageFormat.JPEG or > >> not.http://developer.android.com/reference/android/hardware/Camera.Parame...() > > >> Regards > >> Sarwar Erfan > > -- > Kostya Vasilyev -- WiFi Manager + pretty widget > --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en