Examples of ImageInfo


Examples of ar.com.hjg.pngj.ImageInfo

    private ImageInfo imgInfo;
    private PngWriter writer;
   
    public PNGWriter(File outputFile, int cols, int rows) {
      imgInfo = new ImageInfo(cols, rows, 8, false);
      writer = new PngWriter(outputFile, imgInfo, true);
     
      PngMetadata metaData = writer.getMetadata();
      metaData.setTimeNow();
      metaData.setText(PngChunkTextVar.KEY_Software, "OSM2World");
View Full Code Here

Examples of ca.carleton.gcrc.olkit.multimedia.imageMagick.ImageInfo

      request.setThumbnailFile(thumbnailFile);
      request.setThumbnailCreated(true);

      ImageMagickInfo imInfo = ImageMagick.getInfo();
      ImageMagickProcessor im = imInfo.getProcessor(progress);
      ImageInfo thumbImageInfo = im.getImageInfo( thumbnailFile );
      request.setThumbnailHeight( thumbImageInfo.height );
      request.setThumbnailWidth( thumbImageInfo.width );
    }
  }
View Full Code Here

Examples of com.agiletec.plugins.jpavatar.aps.system.utils.ImageInfo

        String[] args = new String [2];
        args[0] = new Long(avatar.length()).toString();
        args[1] = new Long(this.getImageMaxSize() * 1024).toString();
        this.addFieldError("Avatar", this.getText("jpavatar.avatar.sizeTooBig", args));
      }
      ImageInfo imageInfo = new ImageInfo();
      try {
        FileInputStream fis = new FileInputStream(this.getAvatar());
        imageInfo.setInput(fis);
        if (imageInfo.check()) {
          int width = imageInfo.getWidth();
          int heigth = imageInfo.getHeight();
          if (width != this.getImageWidth() || heigth != this.getImageHeight()) {
            String[] args = new String[4];
            args[0] = new Integer(this.getImageWidth()).toString();
            args[1] = new Integer(this.getImageHeight()).toString();
            args[2] = new Integer(width).toString();
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.ImageInfo

      ImageBundleInfo bundle = ImageBundleContainerInfo.getBundles(frame).get(0);
      List<ImageBundlePrototypeDescription> prototypes = bundle.getPrototypes();
      prototype = prototypes.get(0);
    }
    // create new Image
    ImageInfo newImage = prototype.createImageWidget();
    newImage.putArbitraryValue(JavaInfo.FLAG_MANUAL_COMPONENT, Boolean.TRUE);
    // check live properties
    {
      assertNotNull(newImage.getImage());
      assertThat(newImage.getPreferredSize().width).isEqualTo(10);
      assertThat(newImage.getPreferredSize().height).isEqualTo(20);
      assertThat(newImage.shouldSetReasonableSize()).isFalse();
    }
    // do add
    frame.command_CREATE2(newImage, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  private static final MyImageBundle m_myBundle = GWT.create(MyImageBundle.class);",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
        "      Image image = m_myBundle.first().createImage();",
        "      rootPanel.add(image);",
        "    }",
        "  }",
        "}");
    // permissions
    {
      CreationSupport creationSupport = newImage.getCreationSupport();
      assertTrue(creationSupport.canReorder());
      assertTrue(creationSupport.canReparent());
      assertTrue(creationSupport.canDelete());
    }
    // assert that "image" is bound to AST
    {
      ASTNode node = getNode("image = ");
      assertTrue(newImage.isRepresentedBy(node));
    }
  }
View Full Code Here

Examples of com.lightcrafts.image.ImageInfo

    private void updateImage(TreePath path) {
        try {
            FileNode node = (FileNode) path.getLastPathComponent();
            File file = node.getFile();
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = info.getMetadata();
            if (meta != null) {
                if (thumb != null) {
                    remove(thumb);
                }
                thumb = new ThumbnailComponent(info);
View Full Code Here

Examples of com.lightcrafts.image.ImageInfo

                xmlDoc = new XmlDocument(in);
            }
            catch (IOException e) {
                // Maybe it's an image:
                try {
                    ImageInfo info = ImageInfo.getInstanceFor(file);
                    ImageMetadata meta = info.getMetadata();
                    new Document(meta, null);
                }
                catch (BadImageFileException f) {
                    System.err.println(e.getMessage());
                }
View Full Code Here

Examples of com.lightcrafts.image.ImageInfo

                printCameraMake(files[n]);
            }
        }
        if (file.isFile()) {
            try {
                ImageInfo info = ImageInfo.getInstanceFor(file);
                ImageType type = info.getImageType();
                if (type instanceof RawImageType) {
                    ImageMetadata meta = info.getMetadata();
                    String make = meta.getCameraMake(true);
                    System.out.println(file.getName() + ": |" + make + "|");
                }
            }
            catch (BadImageFileException e) {
View Full Code Here

Examples of com.lightcrafts.image.ImageInfo

                if (xmlDoc != null) {
                    doc = new Document(xmlDoc);
                }
                else {
                    // Maybe it's an image:
                    ImageInfo info = ImageInfo.getInstanceFor(file);
                    ImageMetadata meta = info.getMetadata();
                    doc = new Document(meta);
                }
            }
            catch (BadImageFileException e) {
                fail("Invalid image file", e);
View Full Code Here

Examples of com.lightcrafts.image.ImageInfo

        TreePath path = event.getPath();
        getViewport().removeAll();
        if (path != null) {
            FileNode node = (FileNode) path.getLastPathComponent();
            File file = node.getFile();
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = null;
            Exception error = null;
            try {
                meta = info.getMetadata();
            }
            catch (Exception e) {
                error = e;
            }
            if (meta != null) {
View Full Code Here

Examples of com.lightcrafts.image.ImageInfo

    private void updateImage(TreePath path) {
        try {
            FileNode node = (FileNode) path.getLastPathComponent();
            File file = node.getFile();
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = info.getMetadata();
            if (meta != null) {
                if (preview != null) {
                    remove(preview);
                }
                preview = new PreviewComponent(info);
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.