Examples of Image


Examples of org.jclouds.openstack.nova.v2_0.domain.Image

            .<String, Location> of("az-1.region-a.geo-1", zone));
  
   @Test
   public void testConversionWhereLocationFound() {
      UUID id = UUID.randomUUID();
      Image novaImageToConvert = Image.builder().id(id.toString()).name("Test Image " + id).status(Image.Status.DELETED).build();
      OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86",
               "My Test OS", true);
      ImageInZoneToImage converter = new ImageInZoneToImage(NovaComputeServiceContextModule.toPortableImageStatus,
               constant(operatingSystem), locationIndex);

      ImageInZone novaImageInZoneToConvert = new ImageInZone(novaImageToConvert, "az-1.region-a.geo-1");

      org.jclouds.compute.domain.Image convertedImage = converter.apply(novaImageInZoneToConvert);

      assertEquals(convertedImage.getId(), novaImageInZoneToConvert.slashEncode());
      assertEquals(convertedImage.getProviderId(), novaImageToConvert.getId());
      assertEquals(convertedImage.getLocation(), locationIndex.get().get("az-1.region-a.geo-1"));

      assertEquals(convertedImage.getName(), novaImageToConvert.getName());
      assertEquals(convertedImage.getStatus(), org.jclouds.compute.domain.Image.Status.DELETED);
      assertEquals(convertedImage.getOperatingSystem(), operatingSystem);
   }
View Full Code Here

Examples of org.jemmy.image.Image

                        Math.max(size1.height, size2.height));
                break;
            default:
                throw new IllegalStateException("mode is not recognized");
        }
        Image r1 = resize(image1, size);
        Image r2 = resize(image2, size);
        if(r1 == null) {
            return image1;
        }
        if(r2 == null) {
            return image2;
View Full Code Here

Examples of org.jiaplee.beans.Image

    System.out.println(this.fileName);
    System.out.println(this.contentType);
    System.out.println(this.caption);
    System.out.println(imageService);
    //实例化
    Image i = new Image();
    i.setId(fileName.hashCode());
    i.setFileName(fileName);
    i.setCaption(caption);
    try {
      i.setImage(FileUtils.readFileToByteArray(upload));
    } catch (IOException e) {
      e.printStackTrace();
    }
    // 保存数据
    this.serializable = imageService.save(i);
View Full Code Here

Examples of org.joshy.gfx.draw.Image

                for(int y=0; y<600; y+=256) {
                    for(int x=0; x<600; x+=256) {
                        PixelTile tile = layer.getTile(x/256,y/256);
                        if(tile != null) {
                            //u.p("drawing tile at : " + x + " " + y);
                            Image image = tile.getImage();
                            if(image != null) {
                                gfx.drawImage(image,x,y);
                            }
                        }
                        //tile grid lines
View Full Code Here

Examples of org.mifosplatform.infrastructure.documentmanagement.domain.Image

    @Override
    public CommandProcessingResult deleteClientImage(final Long clientId) {

        final Client client = this.clientRepositoryWrapper.findOneWithNotFoundDetection(clientId);

        final Image image = client.getImage();
        // delete image from the file system
        if (image != null) {
            final ContentRepository contentRepository = this.contentRepositoryFactory.getRepository(StorageType.fromInt(image
                    .getStorageType()));
            contentRepository.deleteImage(clientId, image.getLocation());
            client.setImage(null);
            this.imageRepository.delete(image);
            this.clientRepositoryWrapper.save(client);
        }
View Full Code Here

Examples of org.myphotodiary.model.Image

    try {
      tx = em.getTransaction();
      tx.begin();

      // Get the image description data from database
      Image img = null;
      try {
        // Select distinct for objectDB which returns duplicated entries !
        img = em.createQuery(
            "select distinct img from Image img , Directory dir where img.name = ?1 and img.directory.path = ?2",
            Image.class)
            .setParameter(1, name).setParameter(2, dir).getSingleResult();
      } catch (NoResultException ex) {
        getServletContext().log(
            "No image data for: " + dir + " / " + name, ex);
      }

      // Get the image specific data and map it to a Json response
      JsonObject rsp = updateImageData(img);
      if (img != null) {
        rsp.addParameter(Configuration.descParam, img.getDescription())
        .addParameter(Configuration.ratingParam, img.getRating())
        .addParameter(Configuration.dateParam, img.getDate().toString());
        List<Attribute> imgAttributes = img.getAttributes();
        if (imgAttributes != null) {
          JsonArray attributes = new JsonArray();
          for (Attribute attribute: imgAttributes) {
            attributes.addItem(attribute.getName());
          }
View Full Code Here

Examples of org.newdawn.slick.Image

  }

  @Override
  public void initialize() {
    try {
      crosshair = new Image("crosshair.png");
    } catch (SlickException e) {
      e.printStackTrace();
    }

    cs = world.getSystem(CameraSystem.class);
View Full Code Here

Examples of org.odftoolkit.simple.draw.Image

  public Image setImage(URI imageUri) {
    if (imageUri == null)
      return null;

    splitRepeatedCells();
    Image newImage;
    try {
      NodeList cellPs = mCellElement.getElementsByTagNameNS(OdfDocumentNamespace.TEXT.getUri(), "p");
      if (cellPs != null && cellPs.getLength() > 0) {
        for (int i = 0; i < cellPs.getLength(); i++) {
          mCellElement.removeChild(cellPs.item(i));
        }
      }

      if (mOwnerTable.mIsSpreadsheet) {
        newImage = Image.newImage(this, imageUri);
      } else {
        OdfFileDom dom = (OdfFileDom) mCellElement.getOwnerDocument();
        TextPElement pElement = dom.newOdfElement(TextPElement.class);
        mCellElement.appendChild(pElement);
        newImage = Image.newImage(Paragraph.getInstanceof(pElement), imageUri);
      }
      if (imageUri != null) {
        FrameRectangle rect = newImage.getRectangle();
        double height = rect.getHeight();
        double width = rect.getWidth();
        long widthInMI = new Double(width / 100).longValue();
        Column column = getTableColumn();
        if (widthInMI > column.getWidth()) {
View Full Code Here

Examples of org.ofbiz.widget.menu.ModelMenuItem.Image

            }
            writer.append("\">");
        }

        // the text
        Image img = link.getImage();
        if (img != null) {
            renderImage(writer, context, img);
            writer.append("&nbsp;" + link.getText(context));
        } else {
            writer.append(link.getText(context));
View Full Code Here

Examples of org.openblend.fejstbuk.domain.Image

        return st;
    }

    public Image addImage(User owner, byte[] image) {
        try {
            Image im = new Image();
            im.setImage(new SerialBlob(image));
            im.setUser(owner);
            im.setTimestamp(new Date());
            em.persist(im);
            addLinked(owner, im);
            return im;
        } catch (SQLException e) {
            throw new IllegalArgumentException(e);
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.