Package com.android.ddmlib

Examples of com.android.ddmlib.RawImage


        final boolean landscape = mediator.isLandscape();
        final boolean ccw = p.getBoolean(PREF_ROTATION_CCW, true);
        ImageEx image = null;
        if (d != null) {
            try {
                RawImage screenshot = landscape ? device.getScreenshot().getRotated() : device.getScreenshot();

                if (screenshot != null) {
                    image = renderImage(screenshot, landscape, ccw);
                    image.setLandscape(landscape);
                    image.setCcw(ccw);
View Full Code Here


        final boolean landscape = mediator.isLandscape();
        final boolean ccw = p.getBoolean(PREF_ROTATION_CCW, true);
        ImageEx image = null;
        if (d != null) {
            try {
                RawImage screenshot = landscape ? device.getScreenshot().getRotated() : device.getScreenshot();

                if (screenshot != null) {
                    image = renderImage(screenshot, landscape, ccw);
                    image.setLandscape(landscape);
                    image.setCcw(ccw);
View Full Code Here

        final boolean landscape = mediator.isLandscape();
        final boolean ccw = p.getBoolean(PREF_ROTATION_CCW, true);
        ImageEx image = null;
        if (d != null) {
            try {
                RawImage screenshot = landscape ? device.getScreenshot().getRotated() : device.getScreenshot();

                if (screenshot != null) {
                    image = renderImage(screenshot, landscape, ccw);
                    image.setLandscape(landscape);
                    image.setCcw(ccw);
View Full Code Here

   *
   * @return BufferedImage, or null if the device frame buffer was only partially read
   * @throws IOException
   */
  public BufferedImage getImage() throws IOException {
    RawImage rawImage = device.getScreenshot();

    if (rawImage == null) {
      // Indicates other problems, such as partial replies from the ADB frame-buffer,
      // or an unsupported version of the image format for the current ddmlib
      // (have to check log)
      return null;
    }

    BufferedImage image = new BufferedImage(rawImage.width, rawImage.height, BufferedImage.TYPE_INT_ARGB);

    int index = 0;
    int indexInc = rawImage.bpp >> 3;

    for (int y = 0; y < rawImage.height; y++) {
      for (int x = 0; x < rawImage.width; x++, index += indexInc) {
        int value = rawImage.getARGB(index);
        image.setRGB(x, y, value);
      }
    }

    if (imageFilters != null) {
View Full Code Here

    rawImage = rawImage.getRotated();
    return this;
  }

  public ScreenImage copy() {
    ScreenImage copy = new ScreenImage(new RawImage());
    copy.rawImage.version = this.rawImage.version;
    copy.rawImage.bpp = this.rawImage.bpp;
    copy.rawImage.size = this.rawImage.size;
    copy.rawImage.width = this.rawImage.width;
    copy.rawImage.height = this.rawImage.height;
View Full Code Here

TOP

Related Classes of com.android.ddmlib.RawImage

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.