I have to make a Java program that gets XML files with simple snippets of code from several programming languages and draws them into a flowchart and makes it into a JPEG/PNG image, now I know it must be possible to do this but so far I haven't found anything to help me figure out how I can make Java draw an image and make it into a JPEG.
Is there any library I can use? A tutorial on this? Anything?
Related
I'm trying to make a maths inspired background image for my computer. What I've decided to do is a visualization of the Collatz Conjecture (video for explanation of the mathematical problem and method of visualization: https://www.youtube.com/watch?v=LqKpkdRRLZw&t=224s). Now I know that there are tons of different cool high resolution images on this very topic but half of the fun in it is making it myself.
So on to the problem. The tree structure is already implemented and took a couple of hours (I'm not a great Java programmer) so what I want to do now is create the actual image. I'm in essence looking for a simple image processing package or even some image processing software that can read information from a .txt file and will let me tell it what to do with it. I want to be able to draw lines, assign widths and colors and chose background colors etc. I had thoughts of doing the entire thing in Matlab instead so if you recommend I do it there I can do that as well. Also python is an option. But to clarify the problem isn't the actual making of the tree but rather the visualization and making a pretty image. Thanks for any help.
EDIT: I just found this (http://marvinproject.sourceforge.net/en/index.html). It seems to do what I want. Is it any good?
I have a data flow diagram (a diagram that looks like a flow chart). It has a set of specific geometrical components like rectangles, circles, ellipses and arrows.
What I'm trying to achieve is to detect these shapes and be able to know which component is connected to which component (through the lines) and finally read the text inside each one to extract data from the diagram and do further processing. It is also notable to mention that the diagram will not be drawn by hand but computer generated so we don't have to worry about angles and ratios being inaccurate.
I'm currently working in Java and I was wondering if this is going to be possible since Java is not the best language when it comes to image processing (correct me if I'm wrong). And if it's possible I'd you guys to point out where I should start looking.
I think Java is fine, and it has many libraries to process images. ImageJ is just one example. Personally, I like to use Python, so I write scripts in this language using Java API of the DMelt platform. Look at the documentation of this projecst, wiki. Here is a link to a few examples.
Doing this in Java wasn't a great idea because mainly the lack of online resources. After a good amount of research, I found that the best and the easiest approach was the use of C# and Emgu CV which is a cross platform .Net wrapper to the OpenCV image processing library.
This example helped me to get started with detecting basic geometrical shapes like Lines, Rectangles and Triangles.
I've an issue with drawing an image histogram. I would like to create simple image histogram with basic adjustments. The problem is if there are simple libraries/sdk that could help achieve this. The technology does not matter. I've found that matlab has a lot of image/graph processing tools but it is still kid of "inaccessible" due to the tools. Java/Javascript/python/c# would be great so that I've tagged this question.
AFAIK we can take as eg. RGB components to draw histograms and there would be great if those library would allow to adjust them and in response process the image. I think what I'm looking for is often used in every tool working with graphics.
thx
For python you have matplotlib (http://matplotlib.org/index.html) , it's quite easy and very similar to matlab
I am trying to display some text in lwjgl in java but I dont want to use slick library, do you know if there is any other way to show some text in java using lwjgl ? If so, which external libraries I need to import ??
Unfortunately it's not possible. Either draw it pixel by pixel or use a library. You'll only need slick-util for drawing text, so it shouldn't be a problem. You can find the javadocs here.
Well, the only way I know is to create a java awt image and draw the text on it (using awt) and then pass it to opengl. So, just create a BufferedImage, get its graphics context and write on it using the methods in that. Shouldn't be too hard.
I'm trying to find a simple library to fit my needs, but because I am really unaware of Java libs (I use to do everything from scratch in any programming language that I work with) and the exactly thing that I need is complicated for a Google search query, it would be greatly appreciated any recomendation.
What I am trying to achieve is to do some image manipulation in server side using the sumitted info from a web browser. Is not simple scale or crop, but to be able to rotate, scale and crop every single sprite and draw it in the exactly order to compose the final hight resolution image in a backbuffer then save it in bmp and make some copies in lower resolution as png.
I have no problem with the interface from client side to the server, also I have experience in game programming, so I know how to work with double buffering. What I need is a library that let me do all these images transformation and backbuffer drawing without the need of a front buffer and graphics hardware, because the output will not be the screen, and to be able to access every pixel argb from memory, able to save in various image formats and as a plus but not requiered able to render text from different font.
Thanks for any reply and any recomendations to improve my question will be apreciated too (I am new around here).
A couple of libraries you may find helpful for server side image processing in Java:
JH Labs image filters : http://www.jhlabs.com/ip/filters/index.html
imgscalr image scaling library: https://github.com/thebuzzmedia/imgscalr
Also don't forget the good old BufferedImage API that is already in Java: it has quick a decent range of functionality for basic image manipulation (cropping etc.)
http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html