PNG fireworks format, any understanding? Any libraries?

The ultimate goal is to export the pages to a png firework file into individual images. Therefore, I have a couple of questions:

  • Do you know anything - a library, an application - does it already?
  • Do you have format information? I assume that they store their information in specialized pieces. I just hope that the payload format of these pieces is not that hard to understand.

I have not dug up all the fireworks files yet. I do not find any information about the format, so this is the next step, but I decided that someone could find out a little and save me some time :).

My hope (and probably not so) is that each page is stored as PNG in separate IDAT fragments. It is unlikely, however, because of the vector capabilities. Maybe they store the svg format in chunks?

Any help or discussion is appreciated. I plan to dig it out in the next couple of days.

Ben

EDIT: Here are a couple of things: the related superuser entry below indicates that the files are APNG. fireworks files are not APNG. APNG contains animation fragments: acTL, fcTL, fdAT. Fireworks, in addition to the IDAT, prVW, mkBF, mkTS, mkBS, mkBT blocks, but not one of the APNG blocks.

There is a pretty solid post in PNG fireworks: http://newsgroup.xnview.com/viewtopic.php?f=35&t=20592#p86243

So, I suppose, I need to know what these pieces do and how to analyze them.

+4
source share
1 answer

Interest Ask.

It doesn’t help much if you are trying to write a utility that receives PNG (APNG) fireworks and saves pages, but here it goes:

You can use the Export menu in Fireworks: File> Export> Pages to Files .

You can also use the Save As option and select Photoshop PSD . This option saves pages as folders / groups in the Photoshop layer panel, but it rasterizes vector shapes. However, it can be convenient if you want to parse PSD instead of APNG (for accessing images, pages).

I put together a small script (mainly using docs ) that saves the PSD of your open Fireworks PNG to the folder you select:

var doc = fw.getDocumentDOM(); var loc = fw.browseForFolderURL("select a folder to save pages"); var prevWarn = fw.getPref("PsdExport_Warn100"); // bool fw.setPref("PsdExport_Warn100", false); // don't warn. var kObjToLayer = 1; var kFlatten = 2; var prevLayers = fw.getPref("PsdExport_Layers"); fw.setPref("PsdExport_Layers", kObjToLayer); // flatten layers or not. var kEffectEditable = 1; var kEffectRender = 2; var prevEffects = fw.getPref("PsdExport_Effects"); fw.setPref("PsdExport_Effects", kEffectEditable); var kTextEditable = 1; var kTextRender = 2; var prevText = fw.getPref("PsdExport_Text"); fw.setPref("PsdExport_Text", kTextRender); if(loc) fw.exportPSD(doc, loc+"/yourPages.psd"); // Put the prefs back. fw.setPref("PsdExport_Warn100", prevWarn); fw.setPref("PsdExport_Layers", prevLayers); fw.setPref("PsdExport_Effects", prevEffects); fw.setPref("PsdExport_Text", prevText); 

If you save this as a .jsf file and open the document in Fireworks, you can simply double-click the .jsf file.

I also noticed that there is an Export PSD extension that has more features than my little script here.

If you need vector shapes, you can use File Export> FXG and Images and select All Pages Below Format. FXG is an XML format and specifications are available.

NTN

+1
source

All Articles