I am trying to write a Google App Engine (GAE) Java app to decode QRcodes. Users of my app will send an email to the app with an image containing a QRcode which they want to decode and my GAE app would send a reply with the decoded info. I was planning to use zxing library for this.
Currently I am able to extract the image which came as an attachment in the email. But now to use zxing I need imageIO and BufferedImage classes, which are not part of GAE whitelist. So I am stuck. Can somebody please help me figure out how I can decode a QRcode, with or without zxing?
Google provides their own API for working with images on GAE. You will need to use this API instead of javax.imageio.*. Or rather, since it's your library that makes use of these classes, you'll have to modify the library's source code to work with the GAE classes (or switch to a different library, or write your own). That may be a fairly sizeable job, depending upon how heavily the library relies upon javax.imageio.*.
Edit: Maybe you can refactor your code to use zxing's web-based decoder? That might be simpler than trying to modify their library to use the GAE image API.
Related
In my Java Application, I need to create an RTMP (or RTSP) livestream server and feed raw RGB image data to it.
I'd like to use the Red5 Server project, as it is available via Maven and the Apache 2.0 license fits my needs.
However, I haven't found any introduction tutorials on how to start and feed a livestream server from within a standalone Java Application. I have already added the dependency to my project, and can access all of Red5's classes.
Can you point me to any resources that help me getting started? The task I'm trying to accomplish seems pretty basic to me.
With Red5 you have the control to handle the "input" in any means you want, from a servlet that accepts octet-streams, to pretty much anything else you can think up. So if your input is RGB data, implement something that accepts your byte arrays (like a servlet) and then convert it into one of the Flash supported video codecs, such as h.264; you can use ffmpeg or jcodec to do this. Lastly, you'll want to package the now encoded data into FLV format, that's more difficult, but there are non-red5 examples of how to do this on the net, google for it. Once you have it in the FLV format, create a broadcast stream and dispatch the VideoData to it. Sounds simple right? Its not, but if you are a proficient in Java and / or C/C++, you should be fine.
I am looking for a java library that can display map from different sources.
I saw a similar posts like
(Java equivalent of OpenLayers).
but i am not so sure how its interact with the android interface.
also i need it to support a single picture source (no tiles lib)
similar to http://jsfiddle.net/rdt2/N7dSu/37/.
basically i need something that support image source an Google Maps source
is anyone familiar with such a thing?
If you don't like to run the app in a browser you can always fall back and deploy the OpenLayers browser application via PhoneGap to a native Android app.
http://phonegap.com/
I have some video stored on Google Cloud Storage in mp4, i need the extract a thumbnail from them.
I looked to a number of solutions, and looks like they don't work with App Engine.
for example: http://www.xuggle.com/xuggler/
Do you have library that i could use to do this on Google App Engine in Java?
I finally went with Google Compute Engine and ffmpeg, implementation is in progress...
This question looks related to Is there a Java API for mp4 files?
Xuggler says their project is a mix of java and native code. Native code will not run on java app engine.
Search for java mp4 video decoder and look for a decoders that only use java code. Perhaps this one will work: http://jcodec.org/guide/movstitch.html.
OK, after some searching, I've found following: Video website on google application engine
Sounds like similar problem to yours. The only difference is that the other thread checks for python solution. However answers seem to be quite programming language independent, so I think it will be worth a read.
For the documentation/inspirational purposes, it might be worth to describe your solution in this thread once you go for it.
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
in app engine , i found it doesn't work, it said that java.awt.image.bufferedImage is not supported by GAE.and java.awt.*, javax.imageio.ImageWriter also are not suppoted by GAE. so can someone tell me how to implement those functions in GAE?
so can someone tell me how to implement those functions in GAE?
The simple answer is that it is not possible in GAE.
The Google App Engine has a great built-in Images API for image processing tasks.
For filesystem emulation on the Google App Engine, have a look at GAE VFS
In short, the way you are trying to accomplish your goal is inconsistent with the design of the App Engine.
If the usual built-in packages aren't available, you could try Jimi, which is a pure Java image processing library. It hasn't been updated in the best part of a decade, but it should do the job. No school like the old school.
GAE does not support java.awt images. You have to use GAE Image API to work with images.
Reference: https://developers.google.com/appengine/docs/java/images/
This API operates with bytes. The source/destination of your image data can be: post from form, URL connection, DataStore BLOB or BlobStorage.
For some seasons, when you are using external libs already using BufferedImage behind the scenes the GAE's ImageService is useless. I have googled out https://github.com/witwall/appengine-awt but haven't tryed it yet. i believe it is enough to just add the dependency of this lib to the project to make it working.
I need to develop web app that will return qr code(or link to qr code) to mobile clients. I plan to learn the basics of GWT because i alredy know java programming.
Is it possible to use zxing libraries or some other java libraries with GWT, so generating (encoding) QR codes could be done with a few lines of code? Or do you suggest any other option?
The QR code that will be returned by server will depend on ID that will come with the request from mobile phone.
Tnx
Generating the QR code in-server using a library such as zxing is a pretty obvious way to go about this an could be absolutely appropriate for your application.
But you might also consider off-loading this to an external web-service such as Google Charts. See here. The advantage of this approach, if it works for you, is that you free your service resources and bandwidth from the responsibility so it would likely scale better and be less complex to develop.
The caveat is, of course, is that your application would have to satisfy the provider's terms of use