V vcelak Member Licensed User Longtime User Aug 1, 2014 #1 I have one question - I would like to add to my server side of attendance system software function, which will download and save image from IP camera as blob to mysql db when user action is done on remote terminal. I'm able to do it with gui application, but in concole one, which runs as service is it not possible by httputils. Any suggestions quys?
I have one question - I would like to add to my server side of attendance system software function, which will download and save image from IP camera as blob to mysql db when user action is done on remote terminal. I'm able to do it with gui application, but in concole one, which runs as service is it not possible by httputils. Any suggestions quys?
Erel B4X founder Staff member Licensed User Longtime User Aug 1, 2014 #2 You will need to use jHttpUtils2 source code instead of the library: http://www.b4x.com/android/forum/threads/jhttputils2-source-code.39415/#post-234176 The library depends on jFX which is not available in a console app. The source code uses conditional compilation to remove this dependency. Upvote 0
You will need to use jHttpUtils2 source code instead of the library: http://www.b4x.com/android/forum/threads/jhttputils2-source-code.39415/#post-234176 The library depends on jFX which is not available in a console app. The source code uses conditional compilation to remove this dependency.
V vcelak Member Licensed User Longtime User Aug 1, 2014 #3 Erel said: You will need to use jHttpUtils2 source code instead of the library: http://www.b4x.com/android/forum/threads/jhttputils2-source-code.39415/#post-234176 The library depends on jFX which is not available in a console app. The source code uses conditional compilation to remove this dependency. Click to expand... Hi Erel, I have tried it, but the main problem is that I'm downloading jpeg file from the camera which is binary and there is no way for getbitmap. Download link looks like: "http://192.168.0.68/GetImage.cgi?CH=1&hBase64=YWRtaW46YWRtaW4" Any suggestion? Or simple example? Upvote 0
Erel said: You will need to use jHttpUtils2 source code instead of the library: http://www.b4x.com/android/forum/threads/jhttputils2-source-code.39415/#post-234176 The library depends on jFX which is not available in a console app. The source code uses conditional compilation to remove this dependency. Click to expand... Hi Erel, I have tried it, but the main problem is that I'm downloading jpeg file from the camera which is binary and there is no way for getbitmap. Download link looks like: "http://192.168.0.68/GetImage.cgi?CH=1&hBase64=YWRtaW46YWRtaW4" Any suggestion? Or simple example?
Erel B4X founder Staff member Licensed User Longtime User Aug 1, 2014 #4 You don't need to convert the bytes to an image. Just take the bytes and put them in the database: Code: Copy Dim blob() As Byte = Bit.InputStreamToBytes(Job.GetInputStream) 'store the blob in the database Upvote 0
You don't need to convert the bytes to an image. Just take the bytes and put them in the database: Code: Copy Dim blob() As Byte = Bit.InputStreamToBytes(Job.GetInputStream) 'store the blob in the database
V vcelak Member Licensed User Longtime User Aug 1, 2014 #5 Erel said: You don't need to convert the bytes to an image. Just take the bytes and put them in the database: Code: Copy Dim blob() As Byte = Bit.InputStreamToBytes(Job.GetInputStream) 'store the blob in the database Click to expand... Yes, you are right. I will try it. Thank you for help. Upvote 0
Erel said: You don't need to convert the bytes to an image. Just take the bytes and put them in the database: Code: Copy Dim blob() As Byte = Bit.InputStreamToBytes(Job.GetInputStream) 'store the blob in the database Click to expand... Yes, you are right. I will try it. Thank you for help.
V vcelak Member Licensed User Longtime User Aug 1, 2014 #6 Erel said: You don't need to convert the bytes to an image. Just take the bytes and put them in the database: Code: Copy Dim blob() As Byte = Bit.InputStreamToBytes(Job.GetInputStream) 'store the blob in the database Click to expand... Hi Erel, one more question: Is there any way how to possibly manipulate images in console app? Like resize, embed some text, crop... without fx? Thank you Upvote 0
Erel said: You don't need to convert the bytes to an image. Just take the bytes and put them in the database: Code: Copy Dim blob() As Byte = Bit.InputStreamToBytes(Job.GetInputStream) 'store the blob in the database Click to expand... Hi Erel, one more question: Is there any way how to possibly manipulate images in console app? Like resize, embed some text, crop... without fx? Thank you
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2014 #7 You can call ImageIO API with JavaObject: http://docs.oracle.com/javase/7/docs/api/javax/imageio/ImageIO.html Upvote 0
You can call ImageIO API with JavaObject: http://docs.oracle.com/javase/7/docs/api/javax/imageio/ImageIO.html