I already searched a lot about this but i found results only for Python.
I am trying to get EXIF data from an image, and output it as JSON, but as far as i understand that only Python is supported.
First thing i need to know is the confirmation of this.
I found this one-year-old thread
Java support is still needed in the API.
I have not found other updates about that, in version 1.8.1.1 is still not supported?
For Python there is the regular documentation for the method to extract, but for Java the method does not exists. Another hint for understanding that Java is still not supported
This application i found is exactly what i'm trying to do, but my application is entirely written in Java and i need a version for it.
Can you confirm that Java is still not supported for getting the EXIF data from an image, and there is no way with third part libraries because the Java ImageIO API are not supported by GAE?
Thank you guys!
You can use Python in another version of your application and have your Java version queue a task targeting your Python version that extracts and stores the EXIF info.
Related
I'm trying to create PDFs from xml data. I'm using Apache FOP 1.1 for Java in Windows.
The application runs perfectly in the Eclipse, but when I try to run it from the exported .jar images are not placed in the PDF. I've tryied running it at the cdm in order to see the log of the runtime. Here is the exception:
GRAVE: Image not available. URI: out/iberdrola.png. Reason: org.apache.xmlgraphics.
image.loader.ImageException: The file format is not supported. No ImagePreloader
found for out/iberdrola.png (No context info available) org.apache.xmlgraphics.
image.loader.ImageException: The file format is not supported.
No ImagePreloader found for out/iberdrola.png
at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:180)
I've to explain that even if it's an exception, the program runs until the end and the PDF is rendered but without the image.
I've tryied some different ways to solve the problem, but no success. Much of the information I've googled relates to servelts, but I'm not programming a servelt. By the way, here I give you two different solutions that have worked to some others. They are related but I spect the procedure is different. I don't know how to try them, could anyone explain me those better? Even if they are explained there must be any step I'm missing.
http://apache-fop.1065347.n5.nabble.com/FOP-1-0-images-fail-to-render-td7348.html
Apache FOP in a Java Applet - No ImagePreloader found for data
I'm also open to any other solution to this problem.
Thanks in advice!
Have a nice code!
I finally came out with the solution. I don't know exactly wich of the two steps I made was the one that solved everything, but here it is.
Firstly, I changed the libraries of the project. I realised that the fop_1.1.jar I was using wasn't the official one provided by Apache. So I went to the official site and I downloaded the binary version. I added to my buildpath the fop library and the rest of dependent libraries of the folder called 'lib'.
Then, I increased the compilation version of Java. I was using the 1.4 version and many of the libs used require 1.5 or above. So as I realised that most of the computers nowadays use 1.7 or above I set it to 1.7.
I can't tell you which of the two solutions made this miracle, but for further projects I will check before that I'm using the correct libraries and that I have to check the minimum compilation version.
Have a nice code!
I want to create a .dst embroidery file using Java. Are there any supporting libraries available? Or is it possible to convert any kind of image file to the .dst embroidery file format using Java?
Can anyone suggest any algorithms, encoding-decoding methods, etc?
I am the developer at Embroidermodder working on formats (the link mentioned by theJollySin).
I don't have any Java code, but I can point you to some preliminary documentation of the format (http://www.achatina.de/sewing/main/TECHNICL.HTM).
What are you trying to create in DST? I can assist you with whatever issues you have getting your Java code running.
The short answer to your question is, no. There are currently no popular libraries for generating .dst embroidery files with Java. My guess is that you will have a lot more luck trying to convert other file types to the .dst formats. The only option there (that I know of) is Corel Draw.
In the end, the best solution I can think of is to use the Tajima Ambaasador website. You have to register, but I believe most of their design/DST services are free.
(After some searching around online I also found this website, which has some more free software and seems like the best place to start if you're looking for information.)
Yes. I've written exactly such a library for python (pyembroidery) and trancoded that to java. It will work for both Android and Oracle Java and has fully fleshed out reading and writing of most major embroidery formats.
https://github.com/EmbroidePy/EmbroideryIO
As part of a parallel project I've also done a considerable amount of work documenting various formats for a wiki on the topic. Located here:
https://edutechwiki.unige.ch/en/Embroidery_format
Which also has all the known technical details for DST file formats:
https://edutechwiki.unige.ch/en/Embroidery_format_DST
As for the second part of the question, embroidery files are vector-like files which provides a series of commands to be issued to an embroidery machine. You cannot directly convert raster-based image files to embroidery because the pixel information does not directly convert to any sort of embroidery machine command instruction structure.
I'm currently working on a Neural Network for creating a "better" PNG Predictor (Prefilter).
I already created the network (with JavaNNS) which has a quite good learning rate on 8-Bit grayscale images.
Now my next step would be to include this created network in my prepared PNG Encoder/Decoder which is written in Java. But to do that I need to parse the created .net file from JavaNNS.
I don't want to invent the wheel again so is there any chance that another one of you has already written a simple parser for the .net files of the JavaNNS which would read all the layers with the neurons, the connections and the weights on the connections and store it in any usable Java data structure?
I know it isn't that hard to create a parser, but it would be awesome to save time and skip this "boring" task.. :)
Thanks!
JavaNNS's predecessor, SNNS (alternative link), had an export function which exported the trained network as C code (essentially a header and source file pair). These files could then be used in custom code.
In Java you could use JNI or JNA to call C code and I am sure there are threads here on SO how to accomplish this.
I do not know the current version of JavaNNS, but maybe they already provide an export function exporting the network as Java code instead of C? Or you could open your trained network in the old SNNS and export it?
I just wanna add that I've created my own .net (JavaNNS) File Parser in Java. It is possible to parse single hidden layer networks. If anyone needs the code who run into the same problem I had before I am happy to share my code.
You can contact me on my blog. Here is the post about the Neural Network Project I've done. Just let a comment there and I will provide you the JavaNNS Parser and the corresponding NeuralNetwork Class.
http://prineblog.wordpress.com/2011/06/21/neural-network-as-predictor-for-image-coding-png/
I just updated the Version of Nen to Beta - It is a lightweight 3-layer neural network implementation in Java for regression and classification. A little performance comparison against support vector machines (LibSVM) demonstrates its capabilities. It can be used via command line or Java.
I want to know how to convert html file to image. How do I do this?
You can checkout the source code for the popular BrowserShots service,
http://browsershots.org/
If you're running Windows, and have the GD library installed, you can use imagegrabwindow. I've never used it myself, but as always, the PHP site has lots of documentation and examples.
Use:
WKHTMLTOPDF.
It also has binding to PHP, or you can run it yourself from command line.
Problem is that you need to implement all the functionality of a browser and an HTTP stack (and this still does not deal with the case where the content is modified using javascript).
As John McCollum says, if you've got the website open in a browser on your PC, then you can use imagegrabwindow or snapsIE (MSIE only)
If you want to to be able to get a snapshot using code only, then you might want to look at one of the off the shelf solutions - AFAIK there are several programs (at least 2 of which are called html2pdf) which will generate a PDF of static html - and its relatively easy using standard tools to trim this to window size and convert to an image file.
e.g. https://metacpan.org/pod/distribution/PDF-FromHTML/script/html2pdf.pl
I´m developing a Java solution for manage an iTunes Library (ITL file). The ITL format is a propietary one.
I'm looking for an implementation or a documentation about ITL format but Google can't find anything useful.
Does anyone have experience about that? Where to find more information?
Thanks in advance.
There is an open source project called titl that sounds exactly what you're looking for.
The repository is here: http://code.google.com/p/titl/
Harri
iTunes has an api that you can use to inform iTunes of changes without having to modifying the iTunes ITL file directly. On OSX you can use Applescript, on Windows a DLL that Ive manipulate using Jacob and Java
Most of the time, Apple folks uses preferences list format (or its XML counterpart). As an example, it is the case for iPoho Library file. I have had success parsing this file using commons configuration in the past. Maybe you could try it.