2 Replies Latest reply on Jan 12, 2007 7:52 AM by jmvh

    jsf: paletteTransparencyType bug?

    jmvh
      i have a jsf problem ive been trying to solve for hours now.....i need to export images as 8 bit png's with alpha transparency.

      <code>
      var ex = new ExportOptions();
      ex.exportFormat = "PNG";
      ex.colorMode = "indexed";
      ex.paletteTransparencyType = "rgba";

      fw.getDocumentDOM().setExportOptions(ex);
      fw.exportDocumentAs(d, savePath, null);
      </code>

      when i run this script, my images get saved, but not with transparency. the optimize palette says "No Transparency" no matter what i set paletteTransparencyType to.

      is this a bug, or am i doing something wrong.
        • 1. Re: jsf: paletteTransparencyType bug?
          Level 7
          jmvh wrote:

          > i have a jsf problem ive been trying to solve for hours now.....i need to
          > export images as 8 bit png's with alpha transparency.

          Are you drawing on a transparent canvas?

          --
          Linda Rathgeber [PVII] *Adobe Community Expert-Fireworks*
          --------------------------------------------------------------
          http://www.projectseven.com
          Fireworks Newsgroup: news://forums.projectseven.com/fireworks/
          CSS Newsgroup: news://forums.projectseven.com/css/
          --------------------------------------------------------------
          • 2. Re: jsf: paletteTransparencyType bug?
            jmvh Level 1
            yes, the canvas is tranparent.

            i actually solved this, and found an error in the extending fireworks documentation. after changing a few options in the optimize palette, i took the history steps and converted them to jsf to see what it was doing.

            the documentation states that paletteTransparencyType is a property of the ExportOptions object, when in fact it is not. the correct property is paletteTransparency. wow....that had me scratching my head for hours.

            so the correct jsf would be:

            <code>
            var ex = new ExportOptions();
            ex.exportFormat = "PNG";
            ex.colorMode = "indexed";
            ex.paletteTransparency = "rgba";

            fw.getDocumentDOM().setExportOptions(ex);
            fw.exportDocumentAs(d, savePath, null);
            </code>

            i submitted this to adobe last night.