Hi guys, new user here, although I've been lurking for a while.
I'm wondering if anyone ever implemented a full Save for Web API? I couldn't find anything in xtools. Did I overlook it?
I made a modest start based on script listener output. I've attached it, even though it's not finished (only basic PNG-24 support) or intended for general use. Maybe someone has some use for it. I've commented most parts and decyphered most parameters. The work lies in the fact that diff. file formats introduce diff. parameters in the action descriptors etc.
Greets,
Victor
Save for Web API?
Save for Web API?
SaveForWeb is part of the DOM. See Document.exportDocument.
You can use action manager(scriptlistener) if you are unhappy with the results of the DOM method or want to support metadata which has been added to SFW but not yet to the ExportOptionsSaveForWeb. It seems that most people make a separate function for each format.
However I guess you could create your own custom options object and make a general function using that object to determine how to built the descriptor. But as you pointed out that would be a lot of work and I don't really see an advantage over using separate function or the DOM.
You can use action manager(scriptlistener) if you are unhappy with the results of the DOM method or want to support metadata which has been added to SFW but not yet to the ExportOptionsSaveForWeb. It seems that most people make a separate function for each format.
However I guess you could create your own custom options object and make a general function using that object to determine how to built the descriptor. But as you pointed out that would be a lot of work and I don't really see an advantage over using separate function or the DOM.
Save for Web API?
I overlooked the DOM method apparently, hehe. Well thanks for preventing me from wasting more time on a custom method...
Save for Web API?
I didn't mean to discourage you. If you are new to scripting it would be a great learning exercise.
I just think that the final code would be longer and slower than using separate AM functions or the DOM
I just think that the final code would be longer and slower than using separate AM functions or the DOM