Package flash.swf.tags

Examples of flash.swf.tags.DefineBitsLossless


    if (image != null)
    {
        LosslessImage losslessImage = new LosslessImage(image);
        int width = losslessImage.getWidth();
        int height = losslessImage.getHeight();
      DefineBitsLossless defineBits = DefineBitsLosslessBuilder.build(losslessImage.getPixels(), width, height);
      defineTags.defineBitsLossless2(defineBits);

      DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, defineBits.width, defineBits.height);
      defineTags.defineShape3(ds3);
      applyBounds(ds3.bounds.xMin, ds3.bounds.yMin, ds3.bounds.xMax, ds3.bounds.yMax);
View Full Code Here


    if (image != null)
    {
            LosslessImage losslessImage = new LosslessImage(image);
            int width = losslessImage.getWidth();
            int height = losslessImage.getHeight();
            DefineBitsLossless defineBits = DefineBitsLosslessBuilder.build(losslessImage.getPixels(), width, height);
      defineTags.defineBitsLossless2(defineBits);

      DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, defineBits.width, defineBits.height);
      defineTags.defineShape3(ds3);
            applyBounds(ds3.bounds.xMin, ds3.bounds.yMin, ds3.bounds.xMax, ds3.bounds.yMax);
View Full Code Here

        }
        // PNG or GIF
        else if (MIME_PNG.equals(mimeType) || MIME_GIF.equals(mimeType))
        {
            int[] pixels = (int[])pixelGrabber.getPixels();
            DefineBitsLossless imageTag = createDefineBitsLossless(pixels, width, height);
            return imageTag;
        }
        else
        {
            throw new IOException("Unsupported MIME type: " + mimeType);
View Full Code Here

     *
     * @return the define bits lossless
     */
    public static DefineBitsLossless createDefineBitsLossless(int[] pixels, int width, int height)
    {
        DefineBitsLossless defineBitsLossless = new DefineBitsLossless(TagValues.stagDefineBitsLossless2);
        defineBitsLossless.format = DefineBitsLossless.FORMAT_24_BIT_RGB;
        defineBitsLossless.width = width;
        defineBitsLossless.height = height;
        defineBitsLossless.data = new byte[pixels.length * 4];

 
View Full Code Here

        Image image = tp.getImage();

              LosslessImage losslessImage = new LosslessImage(image);
              int imageWidth = losslessImage.getWidth();
              int imageHeight = losslessImage.getHeight();
              DefineBitsLossless tag = DefineBitsLosslessBuilder.build(losslessImage.getPixels(), imageWidth, imageHeight);

        //Apply Twips Scale of 20 x 20
        AffineTransform at = new AffineTransform();
        at.setToScale(SwfConstants.TWIPS_PER_PIXEL, SwfConstants.TWIPS_PER_PIXEL);
        Matrix matrix = MatrixBuilder.build(at);
View Full Code Here

    if (image != null)
    {
        LosslessImage losslessImage = new LosslessImage(image);
        int width = losslessImage.getWidth();
        int height = losslessImage.getHeight();
      DefineBitsLossless defineBits = DefineBitsLosslessBuilder.build(losslessImage.getPixels(), width, height);
      defineTags.defineBitsLossless2(defineBits);

      DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, defineBits.width, defineBits.height);
      defineTags.defineShape3(ds3);
      applyBounds(ds3.bounds.xMin, ds3.bounds.yMin, ds3.bounds.xMax, ds3.bounds.yMax);
View Full Code Here

    if (image != null)
    {
            LosslessImage losslessImage = new LosslessImage(image);
            int width = losslessImage.getWidth();
            int height = losslessImage.getHeight();
            DefineBitsLossless defineBits = DefineBitsLosslessBuilder.build(losslessImage.getPixels(), width, height);
      defineTags.defineBitsLossless2(defineBits);

      DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, defineBits.width, defineBits.height);
      defineTags.defineShape3(ds3);
            applyBounds(ds3.bounds.xMin, ds3.bounds.yMin, ds3.bounds.xMax, ds3.bounds.yMax);
View Full Code Here

                if (args.containsKey(QUALITY))
                {
                    throw new QualityRequiresCompression();
                }

                DefineBitsLossless defineBits = DefineBitsLosslessBuilder.build(image.getPixels(), image.getWidth(), image.getHeight());
                info.defineBits = defineBits;
            }

            info.width = image.getWidth();
            info.height = image.getHeight();
View Full Code Here

  {
  }

  public static DefineBitsLossless build(int[] pixels, int width, int height)
  {
    DefineBitsLossless defineBitsLossless = new DefineBitsLossless(TagValues.stagDefineBitsLossless2);
    defineBitsLossless.format = DefineBitsLossless.FORMAT_24_BIT_RGB;
    defineBitsLossless.width = width;
    defineBitsLossless.height = height;
    defineBitsLossless.data = new byte[pixels.length * 4];

 
View Full Code Here

    if (image != null)
    {
        LosslessImage losslessImage = new LosslessImage(image);
        int width = losslessImage.getWidth();
        int height = losslessImage.getHeight();
      DefineBitsLossless defineBits = DefineBitsLosslessBuilder.build(losslessImage.getPixels(), width, height);
      defineTags.defineBitsLossless2(defineBits);

      DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, defineBits.width, defineBits.height);
      defineTags.defineShape3(ds3);
      applyBounds(ds3.bounds.xMin, ds3.bounds.yMin, ds3.bounds.xMax, ds3.bounds.yMax);
View Full Code Here

TOP

Related Classes of flash.swf.tags.DefineBitsLossless

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.