Examples of loadImage()


Examples of org.apache.xmlgraphics.image.loader.spi.ImageLoader.loadImage()

                    if (il instanceof ImageLoaderRawPNG || il instanceof ImageLoaderPNG) {
                        // temporary measure until ImageLoaderRawPNG and ImageLoader PNG handle ICC profiles
                        continue;
                    }
                    final ImageInfo im = new ImageInfo(uri, mime);
                    final Image img = il.loadImage(im, isc);
                    final ICC_Profile icc = img.getICCProfile();
                    // Assume the profile can only be correct if the image could
                    // actually be interpreted.
                    if (img.getColorSpace() != null) {
                        profiles.add(icc);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.spi.ImageLoader.loadImage()

                    // Ignore. This imageLoader does not support RAW
                }
                try {
                    final ImageLoader il = ilf.newImageLoader(ImageFlavor.BUFFERED_IMAGE);
                    final ImageInfo im = new ImageInfo(uri, mime);
                    final Image img = il.loadImage(im, isc);
                    final ICC_Profile icc = img.getICCProfile();
                    profiles.add(icc);
                } catch (IllegalArgumentException e) {
                    // Ignore. This imageLoader does not support Buffered.
                }
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.spi.ImageLoader.loadImage()

            throws ImageException, IOException {
        ImageException firstException = null;
        for (int i = 0, c = this.loaders.length; i < c; i++) {
            ImageLoader loader = this.loaders[i];
            try {
                Image img = loader.loadImage(info, hints, session);
                if (img != null && firstException != null) {
                    log.debug("First ImageLoader failed (" + firstException.getMessage()
                            + "). Fallback was successful.");
                }
                return img;
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.spi.ImageLoader.loadImage()

            for (int i = 0; i < ilfs.length; i++) {
                ImageLoaderFactory ilf = ilfs[i];
                try {
                    final ImageLoader il = ilf.newImageLoader(rawFlavor);
                    final ImageInfo im = new ImageInfo(uri, mime);
                    final Image img = il.loadImage(im, isc);
                    final ICC_Profile icc = img.getICCProfile();
                    // Assume the profile can only be correct if the image could
                    // actually be interpreted.
                    if (img.getColorSpace() != null) {
                        profiles.add(icc);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.spi.ImageLoader.loadImage()

                }
                try {
                    final ImageLoader il = ilf
                            .newImageLoader(ImageFlavor.BUFFERED_IMAGE);
                    final ImageInfo im = new ImageInfo(uri, mime);
                    final Image img = il.loadImage(im, isc);
                    final ICC_Profile icc = img.getICCProfile();
                    profiles.add(icc);
                } catch (IllegalArgumentException e) {
                    // Ignore. This imageLoader does not support Buffered.
                }
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.spi.ImageLoader.loadImage()

            throws ImageException, IOException {
        ImageException firstException = null;
        for (int i = 0, c = this.loaders.length; i < c; i++) {
            ImageLoader loader = this.loaders[i];
            try {
                Image img = loader.loadImage(info, hints, session);
                if (img != null && firstException != null) {
                    log.debug("First ImageLoader failed (" + firstException.getMessage()
                            + "). Fallback was successful.");
                }
                return img;
View Full Code Here

Examples of org.gudy.azureus2.ui.swt.plugins.UISWTInstance.loadImage()

          {
            if ( instance instanceof UISWTInstance ){
             
              UISWTInstance  swt = (UISWTInstance)instance;
             
              Image  image = swt.loadImage( "com/aelitis/azureus/plugins/magnet/icons/magnet.gif" );

              menu1.setGraphic( swt.createGraphic( image ));
              menu2.setGraphic( swt.createGraphic( image ));             
            }
          }
View Full Code Here

Examples of org.newdawn.slick.opengl.LoadableImageData.loadImage()

   * @throws SlickException Indicates we were unable to locate the resource
   */
  private void build(String ref, int filter, int tileSize) throws SlickException {
    try {
      final LoadableImageData data = ImageDataFactory.getImageDataFor(ref);
      final ByteBuffer imageBuffer = data.loadImage(ResourceLoader.getResourceAsStream(ref), false, null);
      build(data, imageBuffer, filter, tileSize);
    } catch (IOException e) {
      throw new SlickException("Failed to load: "+ref, e);
    }
  }
View Full Code Here

Examples of org.newdawn.slick.opengl.LoadableImageData.loadImage()

        flip = false;
        data = new ImageIOImageData();
      }
     
      try {
        bufs[i] = data.loadImage(ResourceLoader.getResourceAsStream(refs[i]), flip, false, null);
      } catch (Exception e) {
        Log.error(e);
        throw new SlickException("Failed to set the icon");
      }
    }
View Full Code Here

Examples of org.newdawn.slick.opengl.LoadableImageData.loadImage()

        flip = false;
        data = new ImageIOImageData();
      }

      try {
        bufs[i] = data.loadImage(ResourceLoader
            .getResourceAsStream(refs[i]), flip, false, null);
      } catch (Exception e) {
        Log.error(e);
        throw new SlickException("Failed to set the icon");
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.