Is there a way to export PSDs using AS3 - actionscript-3

Plead/Preparing for standard SO backlash
This is a generic question I apologize as I'm not an SO "noob" and I realize this doesn't fit the format exactly, if you can suggest a better place for this query I'm all ears. If you choose to down vote or close please suggest an alternative.
Question
Is anyone aware of projects that already generate a PSD file from within AS3?
Background (everything below here you may not care about if you just want to answer a question, but if interested I could use a hand)
I've found an AS3 PSD parser here.
For some basic tests this has worked fine (after some tweaking to avoid errors). However, now the task is to reverse this process to write a PSD file.
Current plan (and overall goal)
I also found a file format specification document.
My plan at this point is to just start from the top and work my way through the document building each of the parts of the file (and helper value objects) as I go along. Since this will be a very time consuming process, I'm wondering if there's any other previous work I could build off of.
Ultimately my goal is to integrate this code into a mobile drawing project I've been working on for some time. Since it's a mobile project I have to deal with the possibility that the OS kills my app to reclaim memory, in that case I need to be able to save/load the existing state of the app (currently has layers of BitmapData similar to photoshop, plus would be cool to be able to open PSD files and open my files from the device in photoshop with layers preserved).
Links to live version and code
The app can be downloaded here (is free will remain free, no ads, app is funded by love and the desire to create something cool everyone can have/use):
Google Play
Amazon App Store
Still working on an iOS release (process is more involved than the other two stores)
The code can be found here on github (Flash Builder project files in the FlashBuilderProject/FingerPainting folder).
Legal
Essentially the code contained in that repository is all MIT or Apache Licensed (will be going back to double each of the authors sites to get the original licenses to copy in now, just in case). I'm not a lawyer, but I believe I legitimately obtained everything in the project currently and am simply obligated to include the licenses and make my extensions of the source code available in some cases. (fonts came from google web fonts and downloaded Roboto from Google directly http://developer.android.com/design/style/typography.html). Any code in the com.shaunhusain package I wrote and you can assume is GPL for now. If anyone more legally savvy wants to tell me I'm breaking the law, and how, I would appreciate it.
The portions included and used from other sites include
Actuate MIT License
PNGEncoder2 License included in source from Adobe permits usage.
ShareANE I don't have a license for this one (he didn't include one) the author is chinese, as such I'm having some difficulty figuring out how to contact him, but am assuming I'm safe to use his code.
A couple of pieces of code are in the repository but currently not used including a GIF parser/encoder from bytearray.org and a ColorMatrix class from Grant Skinner.
Update
After trying this for a while I ended up deciding to just use the ORA format since it is open and far far simpler and works fine with GIMP and Krita (open source editors).

I'm not sure about the intended use, but if you are compiling the file in Flash, you might be able to use JSFL to export the fla to a PSD. Then tie the JSFL functionality to a button in a SWF that you load as a panel in the IDE. JSFL is pretty powerful, however it only works within the IDE/locally.

Related

create a (local) HTML webpage which uses a .jar file

I'm very sorry for the possibly confusing title and also for the following expressions, as I'm a complete newbie into coding.
Background:
To make life a bit easier for our team at work, I would like to create a super simple HTML page which lists the most useful links to other tools in our company but is also able to send commands to a converter which exists as a .jar file (which requires different arguments - see attached pdf). Currently, we are running the specific command in the standard command prompt window in Windows to convert files into different formats.
Basic idea:
It would be so cool to have a very simple GUI (incl. some buttons + input masks). The attached PDF should explain it quite well IMO. I would then send around the package (containing the .html + .jar converter files) to my colleagues, so they can open them locally on their PC. If this works out fine, I would love to run this page in on a local intranet web-server, so everyone in our company is able to use the page (without having to store anything locally on their pc).
I know that it might be a bit too much to ask for, but it would be great if you can give me some kind of how-to. Or maybe someone has some nice hints where to start with. I know a bit of html stuff. The most hardest part to me is to execute the inputs with the .jar file.
I would be really happy if someone is able to help out as it has always been a tiny dream to have this "tooling page".
Link to the PDF:
https://wetransfer.com/downloads/ced5bc513b6c551202ba45e4aecbf1bb20220223131350/48f236a4f0989d7cc0c4f3359c70e60320220223131410/269175

Is it possible to program a WebApp where u can import an .csv and export as pdf?

So i am currently working on a project for my company. The target is to make an automated pdf genarator for our products. I want to programm an WebApp for this and constantly implement new functions. We have a prepared Indesign file with a guidline that needs to be met. My question is, is this even possible, to feed the programm with the .csv file and at the end i will receive a finished .pdf(with the design guidline).
It is my first time on StackOverflow, so please excuse if i was not precise enough :)
PS: I know about the Data-Merge function in Indesign, yet this doesn't work for us.
Thanks :)
Yes, this is possible, however when you use it in an actual publicly accessible web app (as opposed to an in-house tool that you use manually), then you will need an InDesign server license for that.
But technically, it is definitively possible to write a script to read .csv files to generate a certain layout with certain contents.

Is there a way to jump to functions inside the code editor in Flash CS4?

In our Flash AS3 code, we have a lot of really long functions and when we're trying to navigate the code during development, it's so long that we often can't sit there and scroll for two minutes trying to find where an event listener leads to a function. We've figured out a trick with the search tool that makes it a little easier (search for "n functionname" because it will find "function functionname"), but it would be even easier if we could just click on the name of the function to jump right to that function inside the editor. Is this possible? I'm not talking about when the project is published - only in the editor. It's just hard to follow the code and remember everything it does when you also have to go looking for where it goes next. (By the way, we're using Flash CS4.)
Like some of the comments, you are going to want to use an external IDE (Development Environment). FlashPro is not designed for programming, but only basic scripting and thus doesn't include much along the lines of developer convenience.
Any code editor will likely work to simply edit your .as files. Here are some popular ones for AS3 development that can also debug and tell FlashPro to compile:
Flash Builder (Paid, built on Eclipse, made by Adobe)
FlashDevelop (free)
FDT (paid, built on Eclipse)
IntelliJ (Paid - free version doesn't support AS3)
Eclipse with free plugins (free)
And a there's a few dozen others...
My personal recommendation (since you seem to be most interested in free), would be FlashDevelop. It is free, quite mature, and integrates nicely with FlashPro so you can debug in it and not have to switch back and forth for testing code changes. (most of the others listed do this as well)
For your primary concern, it has keyboard shortcuts for jumping to a function/object definition (F4 by default, Ctr+F4 to return to where you were), along with tons of other programming conveniences. (again, all the other IDE's listed can do this to)

What does generating an app bundle in Windows 8.1 do?

Windows 8.1 introduced a new feature in the packaging section of the manifest called "Generate app bundle". It says that "Consider generating an app bundle if your app contains language-specific resources, a variety of image scales, or resources that apply to specific versions of DirectX. If you don't generate one, your app will run just fine, but users will have to download a larger app. For more information about app bundles, see App Packaging."
But users can change their language or run the app on a variety of different monitors at any time without reinstalling the app. So how does this feature work, what is it doing?
Basically, the App Package is split up into modular chunks. Each library that you use is split up into its component dll's. The language resources are also split up into a different chunk for each language.
This does a few things. For instance, let's say you have two games, BlackJack and Spades. Both of them use the same base engine, with the same images and base game logic. All of these are included in your 'BaseCardGame' library. In the bundle, it will keep a log of the BaseCardGame library and include it in the bundle. Now, let's say you have a user who downloads both of these apps (as you hope they would). The bundle says "I need the BaseCardGame library with XXXXX signature." Your system says "I already have that, so bundle me up the rest of the stuff that I don't have." So your users only have to download that package once.
The same thing is true for the language resources. If they have only added to their system French and Italian, then it's unlikely they're going to need the Ukrainian language information. So, they don't have to download that. Note: It does not have to be the language they have currently set, only the languages they have added to their system. If they then add a new language, the system will go and get the language packages for the apps that have them.
This is all at a high level, but describes the basics of the bundling system. Channel 9 has quite a few good videos on it.

If project is open source do you bother looking at the sources? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I was pretty surprised to find out that raw sources of my little open source project are getting downloaded more often than the compiled and ready to use library (jar file in this case, platform independent). I wonder what are the reasons behind that? Lack of trust? Curiosity? Compiling with custom settings? Attaching sources for debugging?
Personally I usually don't bother downloading and looking at sources unless something is not working or I don't understand how it works.
I often download sources just to see how other people have implemented certain things. Reading (and understanding) other peoples source code is a good way of becoming a better programmer yourself.
As for the relatively high number of downloads, perhaps your library is included in other projects like a Linux distributions? Such projects usually download and build from source themselves so that they can properly package it.
The first reason would be for customizing applications.
Also its not a good practice to download some code and use it straight away without looking at how the code works. There will be something for you to learn from the code.
Also you might not need the whole functionality of the project. If the project is too big and you need to use only some functionality in it it would be a great idea to trim the project to your needs and then use it.
For every piece of software of long term interest for my company, I look at the sources to assess the quality. The rationale behind it is that badly written software is usually also bad to use and maintain and thus a business risk in the long term.
Even with most commercial software like ERP systems it is no problem to get a look at the source. Only for COTS (say MS Office) it is hard to get the source.
I also check source for every hiring decision.
An other reason why you see so many source downloads might be automated build systems like FreeBSD Ports which download and compile automatically.
I look at the source just to learn how the program works.
As silly as it might seems, the open source software ( such as open source CRMs) is notorious for the lack of documentation. The only way to find out how it works is to experiment with it. When even experiment fails, it's the time to fire up your IDE and read the source!!
Maybe the answer will be disappointing, but the relatively high number of source downloads could mean that the application is packaged in a port-based distribution like Gentoo, FreeBSD or MacPorts where every package is downloaded and compiled on a local machine during installation.
If it's a framework, I always download sources. I use them for debugging and to see how they've implemented certain things. If it's a standalone application, I generally don't look at the source unless there is a problem or the application does something unique.
As you say your binary is a jar, it sounds like it is a Java-library (rather than an application). Developers often use source: to include it in the IDE to debug in the library and lookup certain functions. Also many developers include the sources in their build-process to compile also the dependencies. That may be an explanation.
The number one reason is compiler settings. You can't imagine the amount of pain caused by linking a static library compiled with some incompatible settings. Compiling on your own with checked settings simplifies life greatly. Plus when you decide to change the compiler for the better one you don't need to have the old static library - it will be compiled by the new compiler two.
The number two reason could be that people want to see how some things work inside. For example, they want the same or similar functionality in their commercial closed-source project and can't just borrow code because of the viral license. However they can see how it works and get inspired - that't why they download the source and read.
I have downloaded libraries and compiled them my self but I have not actually looked at the code. When I use a library it is good to know that I can make changes and have the source on hand. I have on occasion taken just a file or two if it is a massive library and I only need a single functionality from a large library.
Some reasons could be:
Distrust of binary downloads due to trojans, etc
Taking a look at how you've implemented something
Checking out the quality of your code :)
Since this is a library, the need for comprehensive documentation is much higher than for a standalone app. I often find myself looking up the code of a library to figure out certain things sometimes left out of the docs, e.g. time/space complexity of certain functions.
We use some open source packages for our commercial application. I always download and build from source.
If our hosting platform changes in
the future, it might change to
something that does not have a
precompiled binary. I want to be
able to use the same package/version
on the new platform.
If the package goes dormant or
becomes unsupported, I want to be
able to apply a change or fix if
absolutely necessary.
If something is going wrong on the
server (memory leak, CPU spike,
etc.), I want to be able to add
logging or instrumentation code to
identify or eliminate the package as
the source of the problem.
I can of course only answer for myself, but it is not seldom that i download the binaries (assuming I trust the project which is usually the case), and the when I debug I download the sources. But I have a tendency to delete the sources when I think I'm done with them and since you are never really done I might have to redownload the sources later and thus causing the source downloads to be higher.