I have been looking through Adobe's File Format Specification for PSD (Photoshop files) and cannot figure out where the details of animation are stored. I am looking for things like looping setting (how many time the animation should loop), duration of each frame, the number of frames in the animation, and which layers are visible on each frame.
I have a basic parser that will read through the bytes in the PSD file and can extract some basic information from the file. For the purpose of the project I am working on, I would really like to extract the animation information.
If someone knows where this data is located in the psd file, it would be really great if you could give me some tips of how to get at it. --would save me a lot of time that would be spent reverse-engineering the file format!
I am using Java for this project, but could adapt it to Objective C, C++, or C# if that is going to make any difference (e.g. in case there is already an existing parser that gets this information from a psd).
There's a PSD plugin for Paint.NET which is Open-Source. You might want to take a look at for starters:
http://frankblumenberg.de/doku/doku.php?id=paintnet:psdplugin#download
Related
Looking for experience not a complete solution. I am aiming at some API/Jar/Code tutorial whereby I can create "ttf" files from the various image format files "png, svg, drawable,etc". I am looking to have some something whereby user can create ttf's on the fly to be used to display on UI screen textbox.
After some research found some browser based support but more interested in code based tutorial, jar anything you guys can provide would be highly appreciated.
We are trying to develop a website for tracking the progress of pipeline and assets. I want to link progress data entered from forms developed in Java to GIS. We will be capturing all the lat and longs of pipeline stretch and lat and log of progress of work.
I need help in developing shapefile dynamically based on the progress and also to view that shape file in my webpage
The javascript API does have functionality for uploading shapefiles form your desktop into the browser, but you will need another tool to create those shapefiles based on the progress.
For uploading the shapefiles, see the example here: https://developers.arcgis.com/javascript/3/jssamples/portal_addshapefile.html
There may be more examples available at https://developers.arcgis.com/javascript/3/.
For creating the shapefiles dynamically, you could use ArcMap or ArcPro if you have those, or one of many python libraries to help write shapefiles. There may even be some Java libraries to help with this as well but I only work on the front end so I cannot help you there.
For something simple in context, the complexity of what kind of workflow to best suite your needs can range depending on these questions (and probably others I'm not thinking of):
Do you absolutely need to create a shapefile for this? Why can't you just push the form to a spatial database (e.g. PostGIS) and then return the XYs of the points or the string of XYs for line features, etc.?
Where is the source of the data & what is the format? Is it a PDF, text on an HTML page, a .csv file downloadable from a page, etc.? You may need to implement scraping (from a site) or download and update, or your data could be live streaming - these are all different workflows and you need to establish these boundaries before setting up your workflow.
If your end game are points, all you need is XYs in a table format to display in GIS software. If they are lines or polygons, it'd be a little different. Again - what output type are they and what are you trying to do with it (e.g. import into QGIS)?
Without these answers, it doesn't make sense for anyone to suggest something to you that could be totally impossible for you to execute. Please answer these and think through your workflow from beginning to end and/or visa versa.
Cheers,
Shawn
I want to develop a karaoke player in Java that works with kar files. I got it to play the song, but I coundn't make it read the lyric information from the file. I've searched a lot, but I coundn't find any clue about how kar files work.
How can I do it? I appreciate some example.
Thanks.
I don't think there is a Java library for that so you'll have to write it on your own code.
First, you need to know the inner structure of a .kar file. Since these files are so small, they're probably some kind of text files. Try opening one of them with your text editor and see what it looks like. Then you'll know how to process it.
Apologies as I don't have a definitive answer for you. I have seen several discussions about this but no real solid solutions. Here are a couple links to others' discussions on the topic. It seems to be a much more complicated task than one might imagine, as it is an uncommonly used file type. From what I know, it consists of MIDI data, albeit with slightly different meta data.
Reading lyrics information from a .kar file
How to read MIDI file in C#?
Can you open the .kar file in a text editor? What does it give you?
The best I could find is this:
"KAR"
Origin: The Company Tune 1000 A file kar (kar) is in fact, a midi
file, but whose words are standardized in events meta of the type
TEXT. The texts starting with # are additional indications compared to
the words. Example:
#L specifies the language of the words
#I any additional information
#T information of title
#KMIDI KARAOKE SPINS information of copyright
and type of file
Several lines of titles and information can be present. KaraWin
extracts information from titles to post them. The text even has a
very simple format to him: \ indicates a page break, /a return
indicates has the line
Source.
Besides that, according to Wikipedia, XBMC is an open source program that supports kar files. Since it's an open source project, you can download its code. If you are really interested, you can try searching among its 10k+ files (in C, not Java), how they do it. Maybe you can ask them or in their forum for a little bit of guidance.
You can also try in this yahoo group about karaoke software.
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.
Howdy! For a research project (in Java), I've got to find some way to save an animation of a graph into some file format. Now I've already got the program working fine drawing each frame. The problem is, short of learning the whole GIF or AVI file format, I have no idea how to assemble the frames programmatically into some sort of animation or video file. File formats don't really matter--input or output. I just need some way to put the frames together and save!
Right now I'm thinking the easiest format would be either animated GIF or AVI. Again, though, it really doesn't matter so long as it works.
Thanks a bunch!
They might not be the best options, but I just thought of these:
You might be able to use some QuickTime APIs. I know they're used fairly often for webcam input, and that they can also generate video.
You could also generate each frame and then assemble them with ffmpeg.
Try Xuggler -- it'll let you save graphics into pretty much any video format.