Examples of ImageData


Examples of Framework.ImageData

     * isInherited=FALSE
     */
    public PictureGraphic getqq_aPicture() {
        if (qq_aPicture == null) {
            qq_aPicture = GraphicFactory.newPictureGraphic("", Constants.CG_CENTER);
            qq_aPicture.setImageValue(new ImageData(new ImageIcon(Main.class.getResource("main.qq_aPicture.png"))));
            qq_aPicture.setWidthPolicy(Constants.SP_NATURAL);
            qq_aPicture.setHeightPolicy(Constants.SP_NATURAL);
            qq_aPicture.setImageSizePolicy(Constants.IS_NATURAL);
            qq_aPicture.setOpaque( true );
            qq_aPicture.setSize(new Dimension(31, 12));
View Full Code Here

Examples of ch.sahits.game.graphic.image.model.ImageData

  }

  @Override
  public BufferedImage init(DisplayImageDIResolver resolver) {
    BufferedImage tmpImg = xmlLoader.getImage(SCENE_IMAGE_NAME); // portScene
    ImageData imgData = xmlLoader.getImageData(SCENE_IMAGE_NAME);
    ImageScaleState state = new ImageScaleState(new Dimension(tmpImg.getWidth(), tmpImg.getHeight()), getBounds().getSize(), imgData.getCrop(), imgData.getMaxCrop());
logger.debug("State of the port scene before: "+state);   
    BufferedImage img = imageUtils.cropAndScale(tmpImg, state);
    scaleMap.put(SCENE_IMAGE_NAME, state.getScaleFactor());
    Rectangle bounds = imageUtils.computeBounds(getBounds().getSize(),new Dimension(img.getWidth(),img.getHeight()));
    initPolygons(resolver, imgData, state, new Point(getBounds().x+bounds.x, getBounds().y+bounds.y));
View Full Code Here

Examples of com.GestDB.swing.table.ImageData

        jTable1.setDefaultRenderer(Object.class, new CellRenderer());
        jTable1.setDefaultEditor(Object.class,new CellEditor(gestor));

        Vector vRows = new Vector();

        ImageData imageBlank = new ImageData();
       
        // cargamos los datos, en caso que sea una modicicaci�n, sino se carga vacio
        if(!esCrear)
        {
            Properties pro = Gestor.skins.getTheme(sskin, stema);
            Object claves[] = pro.keySet().toArray();
            Vector vtemp = null;
            String stemp = null;
            File ftemp = null;
            for(int i=0 ; i < claves.length ; i++)
            {
                vtemp = new Vector(3);
                vtemp.addElement(claves[i]); // propiedad
                stemp = claves[i].toString().substring(0,3); // coge los tres primeros caracteres del nombre de la propiedad
                if(stemp.equals("nam")) // string
                {
                    vtemp.addElement(Gestor.GetLiteral("editskin.string","Cadena")); // tipo cadena
                    vtemp.addElement(pro.getProperty(claves[i].toString())); // valor
                }
                else if(stemp.equals("pri") || stemp.equals("sec") || stemp.equals("bla") || stemp.equals("whi")) // color
                {
                    vtemp.addElement(Gestor.GetLiteral("editskin.color","Color")); // tipo color
                    vtemp.addElement(PropertiesMetal.parseAwtColor(pro.getProperty(claves[i].toString()))); // valor
                }
                else if(stemp.equals("fon")) // Fuente
                {
                    vtemp.addElement(Gestor.GetLiteral("editskin.font","Fuente")); // tipo fuente
                    vtemp.addElement(PropertiesMetal.parseAwtFont(pro.getProperty(claves[i].toString()))); // valor
                }
                else if(stemp.equals("Int")) // icono
                {
                    vtemp.addElement(Gestor.GetLiteral("editskin.image","Imagen")); // tipo imagen
                    // lo que recibimos es el nombre de la imagen.
                    // tenemos que generar la imagen
                    ftemp = new File(Gestor.getRutaBaseSkin() + "themes/" + stema + "/",pro.getProperty(claves[i].toString()));
                    if(ftemp.exists() || ftemp.canRead())
                        vtemp.addElement(new ImageData(ftemp.getAbsolutePath(),ftemp.getName())); // valor
                    else
                        vtemp.addElement(imageBlank);
                }
                else
                {
View Full Code Here

Examples of com.emitrom.lienzo.client.core.types.ImageData

                context.lineTo(20, 5);

                context.stroke();

                ImageData backing = context.getImageData(0, 0, 20, 10);

                if (null != backing)
                {
                    if ((backing.getRedAt(3, 5) == 255) && (backing.getBlueAt(3, 5) == 0) && (backing.getGreenAt(3, 5) == 0))
                    {
                        if ((backing.getRedAt(8, 5) == 0) && (backing.getBlueAt(8, 5) == 255) && (backing.getGreenAt(8, 5) == 0))
                        {
                            return true;
                        }
                    }
                }
View Full Code Here

Examples of com.google.gwt.canvas.dom.client.ImageData

    public DrawableObject getObjectUnderCoordinates(int x, int y) {
        if (gctx != null) {
            int posX = 0;
            int posY = 0;
            //retrieve the color under the click on the ghost canvas
            ImageData id = gctx.getImageData(x, y, 1, 1);
            Color c = new Color(id.getRedAt(posX, posY), id.getGreenAt(posX, posY), id.getBlueAt(posX, posY), id.getAlphaAt(posX, posY));
            if (objectsIndex.containsKey(c.getRGB()));
            {
                if (objectsIndex.get(c.getRGB()) != null) {
                    DrawableElement de = objectsIndex.get(c.getRGB());
                    if (de instanceof DrawableObject) {
View Full Code Here

Examples of de.lessvoid.nifty.renderer.lwjgl.render.io.ImageData

      log.warning(e.getMessage());
    }
  }

  private Cursor loadMouseCursor(final String name, final int hotspotX, final int hotspotY) throws IOException {
    ImageData imageLoader = createImageLoader(name);
    ByteBuffer imageData = imageLoader.loadMouseCursorImage(ResourceLoader.getResourceAsStream(name));
    imageData.rewind();
    int width = imageLoader.getWidth();
    int height = imageLoader.getHeight();
    try {
      return new Cursor(width, height, hotspotX, height - hotspotY - 1, 1, imageData.asIntBuffer(), null);
    } catch (LWJGLException e) {
      throw new IOException(e);
    }
View Full Code Here

Examples of de.mpi.rgblab.data.ImageData

public class ImageDataTest {

  public static void main(String[] args) {
//    float[][][] integralSum = new float[35+1][2570][3469];

    ImageData d = new ImageData();
    float scale = 0.5f;
    d.importData("input_tiff/germany_coordinates.dat", scale);
    // d.importData("input_tiff/test.dat");
    //MemoryUtil.printMemoryInMB("after importData");
    //MemoryUtil.freeMemory();
    System.out.println(d.getNumberOfClasses());
    System.out.println(d.getNumberOfPoints());

    Vector<ColorModel> classColors = ColorReader
        .getColorsAsColorModel("input_tiff/germany_colors.dat");
   
    long currentTimeInSeconds = System.currentTimeMillis();
   
    MemoryUtil.printMemoryInMB("before computing saliency");
    d.computeSaliency(20, classColors);

    MemoryUtil.printMemoryInMB("after computing saliency");
    currentTimeInSeconds = System.currentTimeMillis()
        - currentTimeInSeconds;

    System.out.println("saliency time: " + currentTimeInSeconds + "milliseconds");

    currentTimeInSeconds = System.currentTimeMillis();
    d.computeVisibility(14);

    MemoryUtil.freeMemory();
    MemoryUtil.printMemoryInMB("after computing visibility");
    currentTimeInSeconds = System.currentTimeMillis()
        - currentTimeInSeconds;
View Full Code Here

Examples of edu.harvard.hul.ois.ots.schemas.MIX.ImageData

            wp = null;                          // We leave this null so we can tell if it's been created
            pc = null;                          // We leave this null so we can tell if it's been created
            sc = new ScannerCapture ();         // Add this to icm if needed
            scanm = new ScannerModel ();        // Add this to sc if needed
            sss = new ScanningSystemSoftware ()// add this to sc if needed
            id = new ImageData ();              // Add this to ccs if needed
            gps = new GPSData ();               // Add this to ccs if needed
            sd = new SubjectDistance ();        // Add this to id if needed
           
            // Build DigitalCameraCapture with subelements, but don't hook it to icm
            // until it's needed.
View Full Code Here

Examples of gwt.g2d.client.graphics.ImageData

    while (it.hasPrevious()) {
      Long id = it.previous();
      Surface surface = fIdToSurface.get(id);
     
      // get the color at the given location
      ImageData data = surface.getImageData(x, y, 1, 1);
      double alpha = data.getAlpha(0, 0);
     
      // hit is not transparent - we got a hit!
      if (alpha > Double.MIN_VALUE) {
       
        // look up color
View Full Code Here

Examples of info.bliki.api.creator.ImageData

  }

  public void appendInternalImageLink(String hrefImageLink, String srcImageLink, ImageFormat imageFormat) {
    try {
      String imageName = imageFormat.getFilename();
      ImageData imageData = fWikiDB.selectImage(imageName);
      if (imageData != null) {
        File file = new File(imageData.getFilename());
        if (file.exists()) {
          super.appendInternalImageLink(hrefImageLink, "file:///" + imageData.getFilename(), imageFormat);
          return;
        }
      }
      String imageNamespace = getImageNamespace();
      String[] listOfTitleStrings = { imageNamespace + ":" + imageName };
      fUser.login();
      List<Page> listOfPages;
      if (imageFormat.getWidth() > 0) {
        listOfPages = fUser.queryImageinfo(listOfTitleStrings, imageFormat.getWidth());
      } else {
        listOfPages = fUser.queryImageinfo(listOfTitleStrings);
      }
      for (Page page : listOfPages) {

        imageData = new ImageData(imageName);

        // download the image to fImageDirectoryName directory
        FileOutputStream os = null;
        try {
          String imageUrl;
          if (imageFormat.getWidth() > 0) {
            imageUrl = page.getImageThumbUrl();
          } else {
            imageUrl = page.getImageUrl();
          }
          String urlImageName = page.getTitle().substring(imageNamespace.length() + 1).replace(' ', '_');
          if (imageUrl!=null) {
            int index = imageUrl.lastIndexOf('/');
            if (index>0) {
              urlImageName = imageUrl.substring(index+1);
            }
          }
          String filename = fImageDirectoryName + urlImageName;
          os = new FileOutputStream(filename);
          page.downloadImageUrl(os, imageUrl);
          imageData.setUrl(imageUrl);
          imageData.setFilename(filename);
          fWikiDB.insertImage(imageData);
          super.appendInternalImageLink(hrefImageLink, "file:///" + filename, imageFormat);
          return;
        } catch (FileNotFoundException e) {
          e.printStackTrace();
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.