Basic image manipulation (open, copy, crop, paste) in Java or Android - java

I'm creating an android apps that use basic image manipulation (open image,copy, crop, paste).
Basically, the program will have multiple image input and it will be manipulated(copy, crop, paste). Then, an output image will be saved. I had done this in python using PIL library and would like to do the same using Java.
So, how do i do this in? Can someone point me a good library that have all the features? Thanks.

Hope this makes your work on this easy. I was going through some links and found this.
Let me know if you need anything else. Thanks.Image Manipulation in Java

Related

Android: converting string to image and saving to gallery

In my project I need to save a JPG image to android gallery. Unfortunately, Unity tools do not provide such function in-the-box, so I must implement this function myself. As far as I know, I need to make a little plugin to do that and already figured how to make a simple plugin, but I have questions about my specific goal.
So, the main part is: I have texture in Unity, I encode it to JPG format, resulting in a byte array. Then I convert this byte array into a string to be able to pass this string via android bridge into method located in a java class. Everything that's going to happen further is a black box for me.
I know the basic theory: I need to convert the string into an image somehow, specify the folder for the pictures of my app, save the image into this folder, and somehow refresh device memory so the image is visible in the gallery. But the implementation is a big mystery for me. I know it can be done after a few days of digging, but I guess that this can be done in one-two simple methods.
Can anybody give me some hints? Are there any issues between conversion from C# code in Unity into Java code in, for example, Eclipse?

Create an empty CD-ROM image and inject/extract files into/from it using Java

Using Java I need to be able to create an empty CD image and also to inject/extract files into/from this image. Do you know any java libs for that? Is there a way to accomplish it without using JNI? (if not, then your JNI solution is appreciated). Thank you guys.
PS. This task is required for data transportation between emulated environment created by Qemu emulator.
In principle this is simple to implement, just write a file that is properly structured as CD-image. In practice thats probably a lot of work.
Simply googling for "java create iso image" reveal there is already an implementation to do just that: http://jiic.berlios.de/

How can I find where a specific string is on an image?

I was wondering if anyone knew of a way that I could feed an image file to a Python, C or Java program and get back the coordinates of where a specific string appears on the image?
What you're talking about is called Optical Character Recognition, or OCR.
OCR isn't easy to implement from scratch, but there are libraries out there. OpenCV can be used for OCR.
I looked into this a bit more. It turns out that sikuli does exactly what I needed.

Saving part of a video with FFmpeg using C

I am creating a simple video editing application using Java, JNI, C, and FFmpeg. The UI is being designed in Java and I am talking with FFmpeg from a C file using JNI. Does anyone have any suggestions as to the best way I should go about saving part of a video file using FFmpeg? I am allowing the users to choose parts of the video to save and what I am thinking as of right now is to basically loop through all of the packets and decode each frame (if need to encode to a different format) then save the frame to a file. All the while seeking to different parts of the video based on the users start and stop sections of their crops. If this doesn't make sense I would be glad to clear it up. Any ideas are much appreciated as I am just looking to create the most efficient and correct way to go about doing this. Thanks!
Use xuggler? It will do all for you without you having to figure out the jni bindings.

Extracting image pixel values in google appengine

I am working on google appengine to create a tool for comparing image similarity.
I need to extract the pixel values of each image to perform this.
Unfortunately appengine does not support the java image libs.So I am unable to proceed.
Is there any appengine safe image library in java capable of extracting image data?
I saw some techniques in python but dont want to switch to python if I can do it in java somehow...
GAEJ has its own graphic library with fairly limited features and java.awt.image.BufferedImage is a restricted class (ie, java.awt.Image is not supported and still not present in the Jre Class White List ).
There's an open issue here, that you might want to star.
EDIT:
Somebody has patched pngj to work with InputStream.(You could use it to read a PNG pixel by pixel)
The new version of pngj now an alternative pngj-sandbox.jar that only references whitelisted classes, it should run in google-app-engine.
can https://github.com/witwall/appengine-awt help to you? i believe it willbe enough to add theis lib as dependency to the project to make BufferedImage working (but havent' tried this yet)

Categories