Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I have exported a fireworks .fw.png file to a .png and a .css file. I have lost the .fw.png files and the .css file has 200+ objects. Is there anyway to recreate the slices from the CSS code?

share|improve this question
    
you can open it in a browser (image+CSS) then do a screen shot. –  DA01 Nov 13 '13 at 16:11
    
no, that isn't re-creating the fireworks .fw.png object –  pgee70 Nov 13 '13 at 21:54
    
oh, you want to some how convert it back into the source FW PNG file. Yea, no way to do that. –  DA01 Nov 13 '13 at 22:30

2 Answers 2

Thanks scott, i tend to agree.... ;-)

what i ended up doing was looking at the code that fireworks creates for a slice. I then used the CSS and parsed it through a regular expression to extract the coordinates and slice name. Then i pasted these into excel, translated the numbers to the required format and used the concatenate function to generate a fireworks call. i saved these as a stored fireworks macro.

this got the slices done, but i couldn't work out how to do the layers quickly, so that was a manual process.

share|improve this answer
    
That's an impressive solution! I would have probably just re-imported each of the individual PNGs back into one FW PNG file, assemble them back together, then just draw new slices snapping to the boundaries of the individual PNGs. –  DA01 Nov 13 '13 at 22:31
    
"stored fireworks macro" = javascript, vbscript, applescript, magic...? –  horatio Nov 13 '13 at 22:37
    
Note that posting the source code for the macro (or at least the crucial bit) would be of interest to me and to posterity. –  horatio Nov 13 '13 at 22:39
    
sorry, but it is long gone, i hope to never need it again, and it is the last time i trust our IT dept. to restore a backup.... –  pgee70 Nov 17 '13 at 1:34

I don't think this is possible.

You will have to manually reconstruct things using the CSS as a guide but there's no way to transfer CSS to objects in Fireworks. Also be aware the ability Fireworks has to save a layered PNG file is proprietary to Fireworks. Standard PNG files don't contain layers and construction elements.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.