1242 Lightweigth Image length

Does anybody know the length of the image file that the WLC sends to the Lightweigth AP 1242, I´m using a WLC 2504 running code 7.3.112.0. I would like to know this for considering the amount of remote APs that I could upgrade simultaneously through a 2 Mbps link
Thanks.

Hello Alejandro,
As per your query i can suggest you the following solution-
Guidelines for Upgrading Controller Software
Follow these guidelines before upgrading your controller to software release 6.0:
•Make sure that you have a TFTP or FTP server available for the software upgrade. Follow these guidelines when setting up a TFTP or FTP server:
–Controller software release 6.0 is greater than 32 MB; you must make sure that your TFTP server supports files that are larger than 32 MB. Some TFTP servers that support files of this size are tftpd32 and the TFTP server is within WCS.
If you attempt to download the 6.0 controller software and your TFTP server does not support files of this size, the following error message appears: "TFTP failure while storing in flash."
For more information you can refer to the link-
http://www.cisco.com/en/US/docs/wireless/controller/7.0/configuration/guide/c70mfw.html
Hope this will help

Similar Messages

  • IMAGE Length to fit music LENGTH

    I've been having a miserable time getting my images in a slideshow in iMovie to "fit" the length of the music so they both end at the same time. Usually this involves a very intricate dance that involves setting the time of each image and sometimes doing a manual calculation.
    Oftentimes I have been have a buggy problem of changing all the images' lengths at once - or to get the length of time to stick because they seem to revert back to the original time that was set for the image (which is a real pain).
    I just bought Aperture. Is this possible to do in Aperture? Is there mac software that will let me do this easier? Is there something buggy with my system or do others have a hard time with this? I have slideshows I would like to post but I can't finish them because I can't change the length of the images display...
    Thanks.

    There's an option in the slideshow setting in Aperture 3 to "Fit slideshow to main audio track". That should make things easier for you to set up.

  • ImageSaver: Encoded Image Length is 0

    Hello Guys,
      I am trying to use Image Saver to save an PDF Document generated within the Transaction to a folder. I am working on MII 12.1 SP5 and getting the following error from Image Saver :
    [ERROR] [Image_Saver_1]ImageSaver: Encoded Image Length is 0
    As per the error, i thought it may be due to unavailability of any data in the PDF and then i added PDF Text action and entered some text there. Still then the error is persistent.
    What can be the reason here ...
    Appreciate your response.
    Thanks,
    Amit

    Hello Amit,
    I am not sure on which patch level or build  is your MII running but there was fix for PDF action blocks in patch 3 for SP 5.
    Refer to SAP note: 1457327
    Hope this helps!!
    Regards,
    Adarsh

  • Still image length

    i am making a stop motion thing and i cant seem to change my image length lower than 1 second. i want it to be shorter than 1 second. when i select all the images and then go to duration and try to change it to lower than 1 second it wont let me. example 00:00:01:00 i try and change it to 00:00:00:45 it just thinks i want 1.15 seconds. i want .45 seconds.

    Afromatics,
    The last number are frames, since each second is devided in frames (hence frames per second). So when using NTSC :45 would results in 1:15 since there are only 29,97 frames per second.
    Snerg

  • Image length attributes copy

    I know how to copy attributes from one clip or image to another, however, is there a way to copy one images length or run time to other images? Let's say I have a video full of images, a glorified slide show, and all images import into FCPX with a time of 30 seconds. If I put the first image on the timeline and then reduce the run time to 2 seconds, is there a way to copy & past that run time to all the other images I put down? Like a batch alter function.

    Never mind. Found change duration. but can't get the shortcut key to work.

  • How? Minimize image length when dragging from Project Pane to Timeline

    Greetings Gurus.
    How do you keep an image, dragged from the project panel to the timeline, from spanning the entire composition length?
    Images pulled to the timeline always span the entire composition. When you have a hundred clips, and only need two seconds or so, resizing each clip in a four minute composition is ... well, time consuming. Even dragging to the time and layer order just pushes it off the composition end, and still requires resizing.
    Has to be an easy answer. Ready for my Homer Simpson "Doh!".
    Thanks in advance
    Gr33nE99s

    To reset the out point of 100 layers press Ctrl/Cmnd + a while in the Timeline, move the CTI (current time indicator) to the desired out point, then press Ctrl/Cmnd + ]
    Using the [ key sets the in poing.
    or, as has been mentioned you can reset the default duration for still images in Preferences.

  • DNG Image Width/Length

    Nikon 5000 camera. I am converting nefs to dng. I am new to this whole area. I am trying to figure out why previews ina given software (IDImager) look different for the dng vs the nef. As an aside I am  looking at eh exif data. For the nef the data are:
    Image Width:160
    Image Length: 120
    For the DNG
    Image Width: 256
    Image Length: 170
    Why are they different? And does it matter since as I understand this only for how the RAW data are viewed in any preview and have no effect on the actual "raw" data.
    JD

    If you're talking about the JPEG preview image contained within the files, I think the DNG converter is simply creating a little bit larger preview image.  This does not have any impact on the raw data.

  • Animated GIF image gets distorted while playing.

    Hi,
    I have some animated gif images which I need to show in a jLabel and a jTextPane. But some of these images are getting distorted while playing in the two components, though these images are playing properly in Internet Explorer. I am using the methods insertIcon() of jTextPane and setIcon() of jLabel to add or set the gif images in the two components. Can you please suggest any suitable idea of how I can get rid of this distortion? Thanks in advance.

    In the code below is a self contained JComponent that paints a series of BufferedImages as an animation. You can pause the animation, and you specify the delay. It also has two static methods for loading all the frames from a File or a URL.
    Feel free to add functionality to it, like the ability to display text or manipulate the animation. You may wan't the class to extend JLabel instead of JComponent. Just explore around with the painting. If you have any questions, then feel free to post.
    The downside to working with an array of BufferedImages, though, is that they consume more memory then a single Toolkit gif image.
    import javax.swing.JComponent;
    import java.awt.image.BufferedImage;
    import java.awt.Graphics;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.ImageInputStream;
    public class JAnimationLabel extends JComponent {
        /**The default animation delay.  100 milliseconds*/
        public static final int DEFAULT_DELAY = 100;
        private BufferedImage[] images;
        private int currentIndex;
        private int delay;
        private boolean paused;
        private boolean exited;
        private final Object lock = new Object();
        //the maximum image width and height in the image array
        private int maxWidth;
        private int maxHeight;
        public JAnimationLabel(BufferedImage[] animation) {
            if(animation == null)
                throw new NullPointerException("null animation!");
            for(BufferedImage frame : animation)
                if(frame == null)
                    throw new NullPointerException("null frame in animation!");
            images = animation;
            delay = DEFAULT_DELAY;
            paused = false;
            for(BufferedImage frame : animation) {
                maxWidth = Math.max(maxWidth,frame.getWidth());
                maxHeight = Math.max(maxHeight,frame.getHeight());
            setPreferredSize(new java.awt.Dimension(maxWidth,maxHeight));
        //This method is called when a component is connected to a native
        //resource.  It is an indication that we can now start painting.
        public void addNotify() {
            super.addNotify();
            //Make anonymous thread run animation loop.  Alternative
            //would be to make the AnimationLabel class extend Runnable,
            //but this would allow innapropriate use.
            exited = false;
            Thread runner = new Thread(new Runnable() {
                public void run() {
                    runAnimation();
            runner.setDaemon(true);
            runner.start();
        public void removeNotify() {
            exited = true;
            super.removeNotify();
        /**Returns the animation delay in milliseconds.*/
        public int getDelay() {return delay;}
        /**Sets the animation delay between two
         * consecutive frames in milliseconds.*/
        public void setDelay(int delay) {this.delay = delay;}
        /**Returns whether the animation is currently paused.*/
        public boolean isPaused() {
            return exited?true:paused;}
        /**Makes the animation paused or resumes the painting.*/
        public void setPaused(boolean paused) {
            synchronized(lock) {
                this.paused = paused;
                lock.notify();
        private void runAnimation() {
            while(!exited) {
                repaint();
                if(delay > 0) {
                    try{Thread.sleep(delay);}
                    catch(InterruptedException e) {
                        System.err.println("Animation Sleep interupted");
                synchronized(lock) {
                    while(paused) {
                        try{lock.wait();}
                        catch(InterruptedException e) {}
        public void paintComponent(Graphics g) {
            if(g == null) return;
            java.awt.Rectangle bounds = g.getClipBounds();
            //center image on label
            int x = (getWidth()-maxWidth)/2;
            int y = (getHeight()-maxHeight)/2;
            g.drawImage(images[currentIndex], x, y,this);
            if(bounds.x == 0 && bounds.y == 0 &&
               bounds.width == getWidth() && bounds.height == getHeight()) {
                 //increment frame for the next time around if the bounds on
                 //the graphics object represents a full repaint
                 currentIndex = (currentIndex+1)%images.length;
            }else {
                //if partial repaint then we do not need to
                //increment to the the next frame
    }

  • Can this html code be changed to speed up the image load time?

    I found some html that creates a auto running slide show. I've got three images (small image sizes) but it is slow to start up when the page is first opened. http://web.me.com/phelpssculpture/Site/test.html this is the escaped code:
    <center><img id='imageholder' src='' ></img></center>
    <script type='text/javascript'>
    images = new Array();
    images.push('http://web.me.com/phelpssculpture/Docs/typewriterprpage.jpg');
    images.push('http://web.me.com/phelpssculpture/Docs/royalprpage.jpg');
    images.push('http://web.me.com/phelpssculpture/Docs/Lovetest.jpg');
    var image_index = 0;
    function rotateImage() {
    if (image_index == images.length - 1) { image_index = 0 } else { image_index++ }
    document.getElementById('imageholder').src = images[image_index];
    setInterval('rotateImage()', 5000);
    </script>
    I have a page: http://web.me.com/phelpssculpture/Site/Resume.html
    that has a rollover image (from OldToad) that has two images about the same file size and located in the same folder on my iDisk as the other slide show images but it seems to load instantly.
    this is the escaped code:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    loadImage1 = new Image();
    loadImage1.src="http://web.me.com/phelpssculpture/Docs/typewriterprpage.jpg";
    staticImage1 = new Image();
    staticImage1.src="http://web.me.com/phelpssculpture/Docs/royalprpage.jpg";
    // End -->
    </script>
    <a href="http://web.mac.com/phelpssculpture/Site/royal.html" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;">
    <img name="image1" src="http://web.me.com/phelpssculpture/Docs/royalprpage.jpg" border=0></a>
    Does anyone know if it's possible to improve the html of the slideshow snippet to speed up the initial load time?
    Thanks, David

    Ethmoid:
    There are seven different pages: http://web.me.com/phelpssculpture/Site/movieroyal_davidphelps.html
    Each link is directed to a different page.
    I created the basic layout on one page and then duplicated the page six times.
    the links are in one text box ( that's why they're lined up well ) and each individual word is activated as a link. I changed the background color of the forward tab to match the color of the main shape and used the send forward or send backward command to get the tabs to look right on each page.
    The only problem with the words being in a single text box is that explorer doesn't render the spacing correctly and they fall off their respective tabs. When I get time I will put each word in it's own text box ( it's not that hard to align them ) so it will render properly in explorer.
    Sincerely, David Phelps

  • Appending two images together

    Hi all,
    I'm trying to get a vertical scrolling images going. Basically, what im trying to achieve is similar to those reels you see in slot machines.
    Say, I have 45 images and I wish to align them all in one big "ribbon" and only showing at max 3 images at a time.
    This ribbon will be scrolling from top to bottom. Please refer to the explanation below..
    ------top of the screen-----
    | 1st |
    |------|
    | 2nd|
    ____|
    | |
    |3rd |
    ||___|
    -------- bottom of the screen----
    the rest of the images are loaded offscreen. So as soon as 1st image rolls down, the bottom part of the last image is drawn on to the screen.
    So far, i've been able to draw an image and managed to scroll it down the screen. However, I could not append the 2nd image below it. They overlapped each other.
    Here is my code. Please give an insight. thanks
    public class DrawPanel extends JPanel implements Runnable{
    private int PWIDTH = 200;
    private int PHEIGHT= 600;
    //for animation
    private Thread animator;
    private volatile boolean running = false ;
    private volatile boolean terminate = false;
    //for rendering
    private Graphics bufferGrp;
    private Image bufferImg = null;
    //game elements
    private Symbol []reel;
    private int num_symbols;
    /** Creates a new instance of DrawPanel */
    public DrawPanel() {
    setBackground(Color.BLACK);
    setPreferredSize(new Dimension(PWIDTH,PHEIGHT));
    //create game components here
    //creating Symbol.. modified here.. one symbol only for now..
    num_symbols= 2;
    reel = new Symbol[num_symbols];
    Image pA= getToolkit().getImage("Image/Pic-a.jpg");
    Image sc= getToolkit().getImage("Image/Scat-A.jpg");
    int slen = 200;
    if ( (pA == null) || (sc == null) )
    System.out.println("Cant create image");
    System.exit(0);
    reel[0]= new Symbol(0,0,pA,this,PWIDTH,PHEIGHT);
    reel[1]= new Symbol(0,0,sc,this,PWIDTH,PHEIGHT);
    for(int i=1;i<reel.length;i++){
    if ((i/2)==1)
    reel=new Symbol(0,i*slen,pA,this,PWIDTH,PHEIGHT);
    else
    reel[i]=new Symbol(0,i*slen,sc,this,PWIDTH,PHEIGHT);
    public DrawPanel(int w,int h)
    PWIDTH = w;
    PHEIGHT= h;
    setBackground(Color.BLACK);
    setPreferredSize(new Dimension(PWIDTH,PHEIGHT));
    //create game components here
    num_symbols= 1;
    reel = new Symbol[num_symbols];
    Image pA= getToolkit().getImage("Image/Pic-a.jpg");
    Image sc= getToolkit().getImage("Image/Scat-A.jpg");
    int slen = 200;
    if ( (pA == null) || (sc == null) )
    System.out.println("Cant create image");
    System.exit(0);
    reel[0]= new Symbol(0,0,pA,this,PWIDTH,PHEIGHT);
    // reel[1]= new Symbol(0,200,sc,this,PWIDTH,PHEIGHT);
    public void addNotify()
    super.addNotify();
    startAnimation();
    private void startAnimation()
    //initialise and start the thread..
    if (animator == null || ! running)
    animator = new Thread(this);
    animator.start();
    public void stopAnimation()
    running=false;
    // for fps..
    // private final static int fps = 1000/40; // 40 fps..
    public void run()
    //repeatedly update, render and sleep
    // long startTime,elapsedTime, delayTime;
    // startTime= System.currentTimeMillis();
    running = true;
    int roll= 0;
    while(running)
    panelUpdate(roll);
    panelRender();
    paintScreen();
    if(roll<=PHEIGHT)
    roll+=5;
    else
    roll=0;
    // elapsedTime=System.currentTimeMillis();
    // delayTime= fps - elapsedTime;
    // if(delayTime <= 0) //update took longer than fps
    // delayTime = 5; //delay anyway
    try {
    Thread.sleep(20); // sleep for 20ms
    }catch(InterruptedException e){}
    // startTime=System.currentTimeMillis();
    System.exit(0);
    private void panelUpdate(int y)
    if(!terminate)
    //update the panel state..
    //or update the game elements
    //Roll the logo..
    for(int i=0;i<reel.length;i++)
    reel[i].setPosition(0,y);
    reel[i].updatePosition();
    private void panelRender()
    //draw the current frame to an image buffer..
    //Double buffer rendering..
    if(bufferImg == null)
    bufferImg = createImage(PWIDTH,PHEIGHT);
    if(bufferImg == null)
    System.out.println("Failed to create image buffer");
    System.exit(0);
    else
    bufferGrp= bufferImg.getGraphics();
    //clear the background..
    bufferGrp.setColor(Color.BLUE);
    bufferGrp.fillRect(0,0,PWIDTH,PHEIGHT);
    //draw game element
    //modified here
    for(int i=0;i<reel.length;i++)
    reel[i].draw(bufferGrp);
    if(terminate)
    terminationMsg(bufferGrp);
    private void terminationMsg(Graphics g)
    public void paintComponent(Graphics g)
    //called only after the rendering step has been completed...
    super.paintComponent(g);
    if(bufferImg != null)
    Graphics2D g2d = (Graphics2D)g;
    g2d.drawImage(bufferImg,0,0,null);
    private void paintScreen()
    Graphics g;
    try
    g=this.getGraphics(); // get the panel's graphic content..
    if((g!=null) && (bufferImg!=null))
    Graphics2D g2d = (Graphics2D) g;
    g2d.drawImage(bufferImg,0,0,null);
    Toolkit.getDefaultToolkit().sync();
    g2d.dispose();
    }catch(Exception e){ System.out.println("Graphics context error"+ e) ; }

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class DP extends JPanel implements Runnable{
        private int PWIDTH = 300;
        private int PHEIGHT= 200;
        //for animation
        private Thread animator;
        private volatile boolean running = false;
        //for rendering
        private BufferedImage imageStrip;
        Rectangle clip;
        int pos;
        int deltaY = 1;
        boolean showClip = false;
        public DP(BufferedImage[] images) {
            setBackground(Color.BLACK);
            setPreferredSize(new Dimension(PWIDTH,PHEIGHT));
            imageStrip = createStrip(images);
            clip = new Rectangle(imageStrip.getWidth()+1, 90);
            pos = -imageStrip.getHeight() + clip.height;
            addMouseListener(ml);
        public void addNotify(){
            super.addNotify();
            startAnimation();
        private void startAnimation(){
            //initialise and start the thread..
            if (animator == null || ! running){
                animator = new Thread(this);
                animator.setPriority(Thread.NORM_PRIORITY);
                animator.start();
        public void stopAnimation(){
            running=false;
            if(animator != null)
                animator.interrupt();
            animator = null;
        public void run(){
            running = true;
            while(running){
                pos += deltaY;
                if(pos > 0)
                    pos -= imageStrip.getHeight();
                repaint();
                try {
                    Thread.sleep(100);
                }catch(InterruptedException e){
                    stopAnimation();
        protected void paintComponent(Graphics g){
            super.paintComponent(g);
            int w = getWidth();
            int h = getHeight();
            int x = (w - clip.width)/2;
            int y = (h - clip.height)/2;
            clip.setLocation(x-1, y-1);
            Shape origClip = g.getClip();
            if(!showClip)
                g.setClip(clip);
            g.drawImage(imageStrip, x, y+pos, this);
            if(pos + imageStrip.getHeight() < clip.height) {
                int dy = pos + imageStrip.getHeight();
                g.drawImage(imageStrip, x, y+dy, this);
            if(showClip) {
                g.setColor(Color.red);
                ((Graphics2D)g).draw(clip);
            } else {
                g.setClip(origClip);
        private BufferedImage createStrip(BufferedImage[] images) {
            // Assume all images are same size and type.
            int w = images[0].getWidth();
            int h = images[0].getHeight()*images.length;
            BufferedImage image = new BufferedImage(w, h, images[0].getType());
            Graphics2D g2 = image.createGraphics();
            for(int j = 0; j < images.length; j++) {
                int y = j * images[0].getHeight();
                g2.drawImage(images[j], 0, y, this);
            g2.dispose();
            //JOptionPane.showMessageDialog(this, new ImageIcon(image), "", -1);
            return image;
        public static void main(String[] args) throws IOException {
            String prefix = "images/geek/geek";
            String[] ids = {
                "-c---", "--g--", "---h-", "----t", "-cght"
            BufferedImage[] images = new BufferedImage[ids.length];
            for(int j = 0; j < images.length; j++) {
                String path = prefix + ids[j] + ".gif";
                images[j] = ImageIO.read(new File(path));
            DP test = new DP(images);
            JFrame f = new JFrame("click");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test);
            f.pack();
            f.setLocation(200,200);
            f.setVisible(true);
        private MouseListener ml = new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                showClip = !showClip;
    }geek image files:
    http://java.sun.com/docs/books/tutorial/uiswing/examples/components/index.html

  • How do you make an array of image icons and then call them?

    How do you make an array of image icons and then call them, i have searched all over the internet for making an array of icons, but i have
    found nothing. Below is my attempt at making an array of icons, but i cant seem to make it work. Basically, i want the image to match the value of the roll of the dice (rollVal)
    Any help would be greatly appreciated, some code or link to tuturial, ect.
    /** DiceRoller.java
    * Roll, print, Gui
    import javax.swing.*;
    public class DiceRoller extends JFrame
         private ImageIcon[] image  ;
         public String[] images = { "empty", "dice1.jpg",
                   "dice2.jpg", "dice3.jpg", "dice4.jpg",
                   "dice5.jpg", "dice6.jpg" };
         public Dice die;
         private int rollVal;
         public int rollNum;
         private JLabel j1;
         public DiceRoller(){
              j1= new JLabel("");
           die =new Dice();
           int rollVal;
           rollVal = die.roll();     
           image = new  ImageIcon[images.length];
         for(int i = 0; i < images.length; i++){
          image[i] = new ImageIcon(images);
         if (image!=null){
              j1.setIcon(image[rollVal]);
         System.out.println("Roll = "+die.roll());

    Demo:
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class IconExample {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    launch();
        static void launch() {
            try {
                Icon[] icons = new Icon[6];
                for(int i=0; i<icons.length; ++i) {
                    String url = "http://www.eureka-puzzle.be/cast/images/dice" + (i + 1) + ".jpg";
                    icons[i] = new ImageIcon(new URL(url));
                display(icons);
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
        static void display(Icon[] icons) {
            JPanel cp = new JPanel();
            for(Icon icon : icons) {
                cp.add(new JLabel(icon));
            JFrame f = new JFrame();
            f.setContentPane(cp);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • Needing help: using Keylistener to change images

    I am trying to using the arrow keys to switch between pictures i have but i cant get it to work... mind that im relativly new at java. Here is what i trying to do:
    starts at pic1: press up: frame now has pic2: press down: frame now shows pic1
    my code so far:
    public class test2 {
    static JFrame frame;
    static int position = 0;
    public static void main(String args[]){
    JFrame.setDefaultLookAndFeelDecorated(true);     
    frame = new JFrame("Frame Title");
    JMenuBar menuBar = new JMenuBar();
    JMenu menuFile = new JMenu("File");
    JMenu menuHelp = new JMenu("Help");
    JMenuItem menuFileExit = new JMenuItem("Exit");
    JMenuItem menuFilePlay = new JMenuItem("New");
    JMenuItem menuFileAbout = new JMenuItem("About");
    JMenuItem menuFileHelp = new JMenuItem("Help");
    menuFile.add(menuFilePlay);
    menuHelp.add(menuFileAbout);
    menuHelp.add(menuFileHelp);
    menuFile.add(menuFileExit);
    menuBar.add(menuFile);
    menuBar.add(menuHelp);
         frame.setJMenuBar(menuBar);
    frame.setSize(1025, 769);
    JLabel temp3 = new JLabel(new ImageIcon("EQ2_000000.gif"));     
    JPanel temp4 = new JPanel();
    temp4.add(temp3);
    frame.getContentPane().add(temp4);
    frame.setVisible(true);
    frame.setIconImage(new ImageIcon("bear.gif").getImage());
    menuFileExit.addActionListener
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.exit(0);
    menuFileAbout.addActionListener
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    JFrame About = new JFrame("About");
    About.setSize(200, 200);
    About.setIconImage(new ImageIcon("bear.gif").getImage());
                        JLabel temp = new JLabel(new ImageIcon("bear.gif"));     
                        JPanel temp2 = new JPanel();
                        temp2.add(temp);
                        About.setContentPane(temp2);
                        About.setVisible(true);
    menuFileHelp.addActionListener
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    JFrame About = new JFrame("Help");
    About.setSize(200, 200);
    About.setIconImage(new ImageIcon("bearr.gif").getImage());
                        About.setVisible(true);
         frame.addWindowListener
    new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.addKeyListener
    new KeyAdapter() {
    public void keyPressed(KeyEvent ke) {
                        switch (ke.getKeyCode()) {
                   case KeyEvent.VK_LEFT:
                   break;
    case KeyEvent.VK_RIGHT:
    break;
                        case KeyEvent.VK_UP:
                             frame.getContentPane().removeAll();
                             position = position + 1;
                             JLabel temp7 = new JLabel(new ImageIcon("pics/EQ2_00000" + position + ".gif"));     
                        JPanel temp8 = new JPanel();
                        temp8.add(temp7);
                        frame.getContentPane().add(temp8);
                        System.out.print(" u, " + position );
                   break;
    case KeyEvent.VK_DOWN:
         frame.getContentPane().removeAll();
    position = position - 1;
                             JLabel temp5 = new JLabel(new ImageIcon("pics/EQ2_00000" + position + ".gif"));     
                        JPanel temp6 = new JPanel();
                        temp6.add(temp5);
                        frame.getContentPane().add(temp6);
                             System.out.print(" d, " + position);
    }

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class KeyControl
        BufferedImage[] images;
        int imageIndex;
        JLabel label;
        public KeyControl()
            loadImages();
            imageIndex = 0;
            label = new JLabel(new ImageIcon(images[0]));
            //label.requestFocusInWindow();
            registerKeys(label);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(label);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        private void changeImage(int index)
            label.setIcon(new ImageIcon(images[index]));
            label.repaint();
        private Action up = new AbstractAction()
            public void actionPerformed(ActionEvent e)
                imageIndex = (imageIndex - 1) % images.length;
                if(imageIndex < 0)
                    imageIndex = images.length - 1;
                changeImage(imageIndex);
        private Action down = new AbstractAction()
            public void actionPerformed(ActionEvent e)
                imageIndex = (imageIndex + 1) % images.length;
                changeImage(imageIndex);
        private void registerKeys(JComponent c)
            c.getInputMap().put(KeyStroke.getKeyStroke("UP"), "UP");
            c.getActionMap().put("UP", up);
            c.getInputMap().put(KeyStroke.getKeyStroke("DOWN"), "DOWN");
            c.getActionMap().put("DOWN", down);
        private void loadImages()
            String[] fileNames = { "greathornedowl.jpg", "mtngoat.jpg" };
            images = new BufferedImage[fileNames.length];
            for(int j = 0; j < images.length; j++)
                try
                    URL url = getClass().getResource("images/" + fileNames[j]);
                    images[j] = ImageIO.read(url);
                catch(MalformedURLException mue)
                    System.err.println("url: " + mue.getMessage());
                catch(IOException ioe)
                    System.err.println("read: " + ioe.getMessage());
        public static void main(String[]args)
            new KeyControl();
    }

  • Images not displaying.

    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.geom.*;
    public class Game extends Applet implements Runnable, KeyListener {
         protected Thread thread, animation;
         private int i, keyVal, width, height, firstIndex, cellWidth, cellHeight, cellBorder;
        private double x, y, px, py, dx, dy, ddx, ddy, rate;
         private Image offscreenImage, background, images[];
         private BufferedImage redGuy;   //Create grafix objects to handle back buffering
           private BufferedImage[] drawingImage;
         private Graphics offscr;
        private boolean upPressed, downPressed, leftPressed, rightPressed, spacePressed;      //Keypressed variables
         public Game() { //Constructor (initalizes variables)
              thread = new Thread(this);  //Initalize thread, as new instance of our applet
              i = 0;           // Initalize our loop counter to 0
            x = 1;        // Initalize x coordinate to 1
            y = 1;        // Initalize y coordinate to 1
            px = 0;          // the previous x position    
              py = 0;      // the previous y position
              dx = 0;      // the change of x (delta x) -- speed of x
              dy = 0;      // the change of y (delta y) -- speed of y
              ddx = 10;     // the change of dx (delta delta x) -- acceleration of x
              ddy = 10;     // the change of dy (delta delta y) -- acceleration of y
              rate = 1000 / 30;  //Rate at which we'll make our thread sleep
                                  //the thread sleeping will give us our FPS                         
            //Initalize my keydown variables
            upPressed = false;
            downPressed = false;
            leftPressed = false;
            rightPressed = false;
            spacePressed = false;
            //Initialize array
            drawingImage =  new BufferedImage[7];
         public Image[] loadImageStrip(String filename,  int numImages, int cellWidth, int cellHeight, int cellBorder)
              Image [] images = new Image[numImages];
              MediaTracker mt = new MediaTracker(this);
              Image img = getImage(getDocumentBase(), filename);
              mt.addImage(img, 0);
              try {
                   mt.waitForID(0);
              } catch (InterruptedException ex) { /* Do nothing */ }
              int numCols = 1;//img.getWidth(this) / cellWidth;
              ImageProducer sourceProducer = img.getSource();
              for(int i = 0; i < numImages; i++) {
              images[i] = loadCell(sourceProducer ,((i%numCols) * cellWidth)+cellBorder,
              ((i/numCols) * cellHeight)+cellBorder,
              cellWidth - cellBorder,
              cellHeight - cellBorder);
              return images;
         public Image loadCell(ImageProducer ip, int x, int y, int width, int height) {
              return createImage(new FilteredImageSource(ip, new CropImageFilter(x, y, width, height)));
         public void init() {          //Equivalent of the Main method
              thread.start();          //Start the thread
           background = getImage(getDocumentBase(), "castle.jpg");
         addKeyListener(this);   //Makes our applet listen for pressed keys!
         //Create back buffer for page flipping
         width = getSize().width;          //Set width variable to size of screen
           height = getSize().height;          //Set height variable to size of screen
           offscreenImage = createImage(width, height);     //Create off screen image (back buffer)
           offscr = offscreenImage.getGraphics();
           //Put this next line here so that it only gets drawn once.
           offscr.setColor(Color.black);
           offscr.fillRect(0,0, width, height);     //Draw black background rect.
           images = loadImageStrip("stick_low_punch.bmp", 5, 60, 300, 3);
         public void run() {     //This method is where we will handle our main game loop
              //Infinte loop (to refresh our screen and handle game stuff)
        while(true)
             px = x;          //Sets previous x
              py = y;          //Sets previous y
          i++;     //Increments I (so we can see how many times this loop has ran)
          processKeyPressedEvents();  //Processes any key events that've happened
          processKeyReleasedEvents();
          detectCollide();     //Runs our detect collision code
          repaint();          //Repaints the screen to update stuff.
          try {               
            thread.sleep((int)rate);          //Tells the thread to shut down for 33 milliseconds
                 } catch (InterruptedException e) { }
      //Paint method.  Paints everything to the applet for us.
           public void paint(Graphics g)
                offscr.setColor(Color.black);     //Set Color to black
                offscr.drawImage(background, 0, 0, this);
            offscr.drawString("i = "+i,10,20);  //Shows value of i at Location 10, 20
            offscr.drawString("Key = " + keyVal, 70, 20);   //Draw key value
            for(int q = 0; q < images.length; q++) {
                   offscr.drawImage(images[q], (int)x, (int)y , this);
                   offscr.drawString("Q = " + q, 70, 40);
                g.drawImage(offscreenImage, 0, 0, this);
           public void update(Graphics g)
             paint(g);
         public void keyPressed(KeyEvent e) {
              keyVal = e.getKeyCode();
              switch(keyVal) {
                   case KeyEvent.VK_UP : upPressed = true;
                   break;
                   case KeyEvent.VK_DOWN : downPressed = true;
                   break;
                   case KeyEvent.VK_LEFT : leftPressed = true;
                   break;
                   case KeyEvent.VK_RIGHT : rightPressed = true;
                   break;
         public void keyReleased(KeyEvent e) {
              keyVal = e.getKeyCode();
              switch(keyVal) {
                   case KeyEvent.VK_UP : upPressed = false;
                   break;
                   case KeyEvent.VK_DOWN : downPressed = false;  
                   break;
                   case KeyEvent.VK_LEFT : leftPressed = false;   
                   break;
                   case KeyEvent.VK_RIGHT : rightPressed = false;
                   break;
         public void keyTyped(KeyEvent e) {
         //I don't need this method for now.     
           public void detectCollide() {
          /*  Collision detection for borders of window */
          if(x <=0) { x = 1;}       //Detect x at left
          if(y <=0) { y = 1;}       //Detect y at top
          if(x >=getSize().width-50) { x = getSize().width-50;}   //Detect x at right
          if(y >=getSize().height-180) { y = getSize().height-180;}   //Detect y at bottom
         public void processKeyPressedEvents() {      //This will handle the events if a key is pressed.
          /* This is an IMPORTANT method.
           *not only does it make for smoother movement
           *but it also allows us to press and
           *hold multiple keys.  Without this
           *method, holding a key down would
           *be interrupted by the next key pressed
          if(upPressed == true) {
           y -= ddy;  dy -= ddy;
          if(downPressed == true) {
                y+= ddy; dy += ddy;
          if(leftPressed == true) {
                x-= ddx; dx -= ddx;
          if(rightPressed == true) {
                x+= ddx; dx += ddx;
      public void processKeyReleasedEvents() {
           if(upPressed == false) {while(dx < 0) {dy += ddy; }}
          if(downPressed == false) {while(dy > 0) {dy -= ddy; }}
          if(leftPressed == false) {while(dx < 0) {dx += ddx; }}
          if(rightPressed == false) { while(dx > 0) {dx -= ddx; }}
    }For some reason my image (the strip image) is not displaying. It's loading, but nothing is being shown.
    If anyone can figure out why, please let me know, I've been beating my head off the wall for about 2 weeks now.
    Thanks,
    Brian

    I noticed in your code you are trying to load a bitmap image. I don't think Java is capable of using that
    image format yet.. Stick to using .jpg , .gif, .png

  • [CS3 JS] Getting information about Photoshop images in InDesign

    Hello,
    Through an InDesign script I can get many pieces of information about an image such as the file name, resolution in PPI, dimension in inches, color mode, etc.
    What I am wondering is if it is possible to find out how many layers a Photoshop image may have. I would like a quick way to know if an image has been flattened (one layer) without having to open up the image in Photoshop.
    Tom

    You can do this via BridgeTalk, here is an example. Select a TIF or PSD image and run the script.
    const gScriptName = "Get number of layers";
    const gScriptVersion = "1.0";
    var gLayersNumber;
    Main();
    //===================================== FUNCTIONS  ======================================
    function Main() {
        var image, pixelDimensionsArr, folderPath, copyResult;
        var doc = app.activeDocument;
        try {
            if (app.selection[0].constructor.name == "Image") {
                image = app.selection[0];
            else if (app.selection[0].images.length > 0) {
                image = app.selection[0].images[0];
            else {
                ErrorExit("The selection contains no image.");
        catch(err) {
            ErrorExit("The selection contains no image.");
        var link = image.itemLink;
        if (!link.isValid) ErrorExit("Can't get the link.");
        if (link.linkType == "Photoshop" || link.linkType == "TIFF") {
            if (link.status == LinkStatus.NORMAL) {
                linkFile = new File(link.filePath);
                if (linkFile.exists) {
                    CreateBridgeTalkMessage(link.filePath);
                    alert("Number of layers: " + gLayersNumber);
    function CreateBridgeTalkMessage(imagePath) {
        var bt = new BridgeTalk();
        bt.target = "photoshop";
        var script = "GetLayersNumber = " + GetLayersNumber.toSource() + "\r";
        script += "GetLayersNumber(\"" + imagePath + "\");";
        bt.body = script;
        bt.onResult = function(resObj) {
            gLayersNumber = resObj.body;
        bt.onError = function(msg) {
            alert("Error: " + msg.body);
        bt.send(100);
    function GetLayersNumber(imagePath) {
        var f = new File(imagePath);
        app.displayDialogs = DialogModes.NO;
        var doc = app.open(f);
        var layersNumber = doc.artLayers.length;
        doc.close(SaveOptions.DONOTSAVECHANGES);
        app.displayDialogs = DialogModes.ALL;
        return layersNumber;
    function ErrorExit(error, icon) {
        alert(error, gScriptName + " - " + gScriptVersion, icon);
        exit();

  • Using Javascript to rotate images with the style.backgroundImage property & I leave the onload pg & return, the images have trouble loading.

    I'm using Javascript to rotate background images -->
    function rotateImages() {
    setInterval("startRotator()", 7000);
    var counter = 0;
    function startRotator() {
    var images = ["images/finance1.jpg","images/finance2.jpg","images/finance3.jpg","images/finance4.jpg","images/finance5.jpg","images/finance6.jpg"];
    if( counter >= images.length ) {
    counter = 0;
    var image = "url('" + images[counter] + "')";
    counter++;
    document.body.style.backgroundImage=image;
    The script is triggered by the load event when the homepage loads and the script only runs on the homepage. Everything works fine upon opening the homepage.
    If I leave the home page and return, the images will have trouble loading for about 3 to 5 cycles and I'll get white backgrounds for part of the time. The same thing happens if I enter the site from a page other than the homepage and then go to the homepage.
    I discovered, however, that if I enter the site at the homepage and then leave the homepage and return using the back button, everything runs fine. Apparently it then accesses a cached version of the homepage? Seems having two cached versions creates a conflict?
    This problem only happens with Firefox (I have ver 29.0.1). It does not happen on IE ver 11, Chrome ver 34, or Safari ver 5.1.7.
    I get the same problem with XP, Win7, and Win8 but, only on Firefox.
    Can you please fix this?

    Hey, I am trying to reproduce this here: [http://jsfiddle.net/u3TLb/]
    Mozillazine forums and the [http://webcompat.com] are more specialized in Web Compatibility, please ask there as well.

Maybe you are looking for

  • GUI_DOWNLOAD

    Hi all, I'm trying to export an internal table to Excel, but I have a problem. As the internal table has about 1700 records, the function GUI_DOWNLOAD only download about 1600. I have already tried with method cl_gui_frontend_services = > gui_downloa

  • Recording from Record Player

    I was recording music from Record Player to LP; lost sound, reinstalled Drivers, still nothing, Please Help!

  • How to read a part of a TDMS file?

    Hi, I'm having problems loading back a part of a TDMS file. Im currently trying to use the offset and count input on TDMS read. But the offset value doesn't seem to make any difference: If I set offset to 5 and count to 10 it still puts out 10 data p

  • Wlc 5508 upgrade problem from 7.0.116.0 to 7.0.235.3

    We have two WLC model 5508 with the follwing information Manufacturer's Name.............................. Cisco Systems Inc. Product Name..................................... Cisco Controller Product Version.................................. 7.0.116

  • Boolean User Properties always returns TRUE

    Hi, I am trying to get some propeties from the user on the AD and I found out with the following issue, all the boolean attributes always return TRUE as value. The Code that I am using to extract them is the following foreach ($objUser in $objUsers)