Package java.awt.image

Examples of java.awt.image.MemoryImageSource


         // Image Input
         if (evt.getSourcePinIndex()==1)
         {
           VSImage24 vsimg=(VSImage24)img;

           Image gf= Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(vsimg.getWidth(),vsimg.getHeight(),vsimg.getPixels(), 0, vsimg.getWidth()) );
           out.image=gf;
           xwidth.setValue(vsimg.getWidth());
           xheight.setValue(vsimg.getHeight());
           out.type=element.C_SHAPE_IMAGE;
           out.x1=(int)x.getValue();
View Full Code Here


    /** Notify this picture that its image has been changed and that it is
     *  now OK to display the new image.
     */
    public void displayImage() {
        if ((_imageSource == null) && (_image == null)) {
            _imageSource = new MemoryImageSource(_width, _height, ColorModel
                    .getRGBdefault(), _pixels, 0, _width);
            _imageSource.setAnimated(true);
            _image = createImage(_imageSource);
        }

View Full Code Here

        int ySize = ((IntMatrixToken) in).getRowCount();

        if (_frame != null) {
            // We have a frame already, so just create an AWTImageToken
            // and tell the effigy about it.
            MemoryImageSource imageSource = new MemoryImageSource(xSize, ySize,
                    ColorModel.getRGBdefault(),
                    _convertBWImageToPackedRGBImage((IntMatrixToken) in), 0,
                    xSize);
            imageSource.setAnimated(true);

            // Sadly, we can't easily create an image without some sort
            // of graphical context here.  This is a huge shortcoming of
            // awt.  Just because I'm operating on images, I should not
            // need a frame.
View Full Code Here

                    pix[index] = 255 << 24 | 255;
                 }
                index++;
            }
        }
        img = createImage(new MemoryImageSource(w, h, pix, 0, w));
        g.drawImage(img, 0, 0, null);
    }
View Full Code Here

                        float t = (float)i / (numFrames - 1);
                        int[] srcPixels = filter.getPixels(sourceImage, width, height);
                        int[] destPixels = filter.getPixels(destImage, width, height);
                        int[] outPixels = new int[width * height];
                        filter.morph(srcPixels, destPixels, outPixels, warpGrid1, warpGrid2, width, height, t);
                        Image f = createImage(new MemoryImageSource(width, height, outPixels, 0, width));
                        g.drawImage(f, i * width, 0, this);
                    }
                    g.dispose();
                    Frame frame = new Frame();
                    ImageDisplay canvas = new ImageDisplay();
View Full Code Here

            int height = sourceImage.getHeight(this);
            int[] srcPixels = filter.getPixels(sourceImage, width, height);
            int[] destPixels = filter.getPixels(destImage, width, height);
            int[] outPixels = new int[width * height];
            filter.morph(srcPixels, destPixels, outPixels, warpGrid1, warpGrid2, width, height, t);
            editor3.setImage(createImage(new MemoryImageSource(width, height, outPixels, 0, width)));
        } else {
            filter.setSourceGrid(warpGrid1);
            warpGrid1.lerp(t, warpGrid2, warpGrid3);
            filter.setDestGrid(warpGrid3);
            editor3.setImage(createImage(new FilteredImageSource(sourceImage.getSource(), filter)));
View Full Code Here

      for(int x = 0; x < dimensions.frameWidth; x++) {
        rotate[((dimensions.frameWidth - x - 1) *dimensions.frameHeight)+y] = buffer[(y*dimensions.frameWidth)+x];
      }
    }

    return new MemoryImageSource(dimensions.frameHeight, dimensions.frameWidth, rotate, 0, dimensions.frameHeight);

  }
View Full Code Here

     *
     */
    public void main() {

        fMain = new Frame("HSQLDB Database Manager for Zaurus");
        imgEmpty = createImage(new MemoryImageSource(2, 2, new int[4 * 4], 2,
                2));

        fMain.setIconImage(imgEmpty);
        fMain.addWindowListener(this);

View Full Code Here

                iTransferMode = TRFM_DUMP;
            }
        }

        fMain = new Frame("HSQL Transfer Tool");
        imgEmpty = createImage(new MemoryImageSource(2, 2, new int[4 * 4], 2,
                2));

        fMain.setIconImage(imgEmpty);
        fMain.addWindowListener(this);
        fMain.setSize(640, 480);
View Full Code Here

            // Poll once per row to see if we've been told to stop.
            if (runner != me) {
                return null;
            }
        }
        return createImage(new MemoryImageSource(width, height,
                ColorModel.getRGBdefault(), pixels, 0, width));
    }
View Full Code Here

TOP

Related Classes of java.awt.image.MemoryImageSource

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.