Blackjack drawing multiple images problem

Hi. Im making a blackjack game and im having some trouble drawing the images.
The drawing is fine. But the problem is when to draw new cards. I dont know how to draw a new card without the old one dissapearing. I understand why it dissapears as the code is now, but i dont know how to fix it. Somehow i have to make each card beeing able to paint itself on the board? The filenames of the images to be drawn is fetched by the getCard() in the card class. Since blackjack doesnt use that many cards in play at the same time its possible to simply make more image variables and some if statements deciding which to paint, but that sollution isnt very nice, and i want to make more advanced cardgames after this, so if someone could help me with this it would truly be great.
Thanks.
Image displaying board after first new card is dealed, and third one
http://www.wannerskog.com/newcards.jpg
Card Class
public class Card {
     private int value;
     private String color;
     public Card(String incolor,int invalue) {
          value = invalue;
          color = incolor;
     public String getCard() {
          return value+color;
     public int getValue() {
          return value;
Deck
import java.util.*;
//Creates a deck of cards
public class Deck {
     Card card;
     private Set deck = new HashSet();
     List deck2;
     public void createDeck() {
          for(int i=2; i<=14; i++) {
               card = new Card("s",i);
               deck.add(card);
          for(int i=2; i<=14; i++) {
               card = new Card("h",i);
               deck.add(card);
          for(int i=2; i<=14; i++) {
               card = new Card("c",i);
               deck.add(card);
          for(int i=2; i<=14; i++) {
               card = new Card("d",i);
               deck.add(card);
          deck2 = new Vector(deck);
     public void shuffleDeck() {
          Collections.shuffle(deck2);
     public List getDeck() {
          return deck2;
Dealer Class
import java.util.*;
public class Deal {
     Deck deck = new Deck();
     private String card1;
     private String card2;
     public Deal() {
          deck.createDeck();
          deck.shuffleDeck();
     public void dealCards(int j) {
          deck.shuffleDeck();
          List d = (List)deck.getDeck();
          Card card;
          Iterator it = d.iterator();
          String card1 = "";
          String card2 = "";
          for(int i=1; i<=j; i++) {
               card = (Card)it.next();
               if(i==1) card1 = card.getCard();
               if(i==2) card2 = card.getCard();
          this.card1 = card1;
          this.card2 = card2;
     public String getCard1() {
          return card1;
     public String getCard2() {
          return card2;
Jpanel displaying the buttons
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Controll extends JPanel {
     JButton deal = new JButton("Deal");
     JButton newcard = new JButton("New card");
     JButton stay = new JButton("Stay");
     JButton exit = new JButton("Exit");
     public Controll(View view) {
     final Deal d = new Deal();
     final View v = view;
          class ChoiceListener implements ActionListener
               int i=0;
               public void actionPerformed(ActionEvent event) {
                    if("deal".equals(event.getActionCommand()))
                         d.dealCards(2);
                         stay.setEnabled(true);
                         newcard.setEnabled(true);
                         deal.setEnabled(false);
                         v.dealCards(d.getCard1(),d.getCard2());
                         v.resetNew();
                         v.repaint();
                         i=0;
                    if("exit".equals(event.getActionCommand()))
                         System.exit(0);
                    if("newcard".equals(event.getActionCommand()))
                         if(i != 3) {
                              d.dealCards(1);
                              v.newCard(d.getCard1(),20);
                              v.repaint();
                              i++;
                         if(i == 3) {
                              newcard.setEnabled(false);
                              stay.setEnabled(false);
                              deal.setEnabled(true);
                    if("stay".equals(event.getActionCommand()))
                         deal.setEnabled(true);
                         stay.setEnabled(false);
                         newcard.setEnabled(false);
          Color c = new Color(0, 0, 100);
          setPreferredSize(new Dimension(400, 40));
          setBackground(c);
          ActionListener listener = new ChoiceListener();
          deal.setActionCommand("deal");
          exit.setActionCommand("exit");
          newcard.setActionCommand("newcard");
          stay.setActionCommand("stay");
          exit.addActionListener(listener);
          deal.addActionListener(listener);
          newcard.addActionListener(listener);
          stay.addActionListener(listener);
          add(deal);
          add(newcard);
          add(stay);
          add(exit);
          stay.setEnabled(false);
          newcard.setEnabled(false);
JPanel displaying the board with cards
import java.awt.*;
import javax.swing.*;
import java.awt.image.*;
import java.awt.event.*;
public class View extends JPanel {
     String dealcard1;
     String dealcard2;
     String newcard;
     int i;
     private Image cardimage1 = null;
     private Image cardimage2 = null;
     private Image cardimage3 = null;
     public View() {
          Color c = new Color(0, 100, 0);
          setPreferredSize(new Dimension(400, 300));
          setBackground(c);
     public void dealCards(String incard1, String incard2) {
          dealcard1 = incard1;
          dealcard2 = incard2;
     public void newCard(String incard3,int j){
          newcard = incard3;
          i = i+j;
     public void resetNew() {
          i=0;
          newcard = "";
     public void paint(Graphics g) {
          super.paint(g);
          Toolkit kit = Toolkit.getDefaultToolkit();
          cardimage1 = kit.getImage("CardImages/"+dealcard1+".gif");
          cardimage2 = kit.getImage("CardImages/"+dealcard2+".gif");
          cardimage3 = kit.getImage("CardImages/"+newcard+".gif");
          g.drawImage(cardimage1,80,200,this);
          g.drawImage(cardimage2,100,200,this);
          g.drawImage(cardimage3,180+i,200,this);
Main
import javax.swing.*;
import java.awt.*;
public class Main
     public static void main(String[] args)
               JFrame frame = new JFrame("card");
               View v = new View();
               Controll c = new Controll(v);
               frame.getContentPane().add(v, BorderLayout.NORTH);
               frame.getContentPane().add(c, BorderLayout.SOUTH);
               frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
               frame.pack();
               frame.show();
}

Actually, your app looks okay. Since you asked for some ideas I made some changes, including changing the name of some classes, variables and the image folder. I put all the files in one because I'm lazy. Score is the only class without changes. And nice images.
Some suggestions:
1 � try to keep the responsibilities of the View/CardTable class limited to rendering images. You only need to load an image once; continual loading makes for slow performance. If you are using j2se 1.4+ you can use the ImageIo read methods and could then load the images in the Deck class, eliminating the need to pass the images to Deck from View/CardTable (which is an ImageObserver needed for the MediaTracker).
2 � let the classes do more of the work, eg, Deal/Dealer can add the new cards to the View/CardTable. This will simplify the event code. The ChoiceListener class could be an inner named/nested class and will be easier to follow/maintain if removed from the class constructor.
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
public class CardGame
    public static void main(String[] args)
        JFrame frame = new JFrame("card");
        CardTable table = new CardTable();
        Controller control = new Controller(table);
        frame.getContentPane().add(table, BorderLayout.NORTH);
        frame.getContentPane().add(control, BorderLayout.SOUTH);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
class CardTable extends JPanel {
    Image[] images;
    Image cardBack;
    private String score;
    List player, house;
    public CardTable() {
        loadImages();
        score = "0";
        player = new ArrayList();
        house = new ArrayList();
        Color c = new Color(0, 100, 0);
        setPreferredSize(new Dimension(400, 300));
        setBackground(c);
    public void setScore(int score) {
        this.score = String.valueOf(score);
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        int x = 80, y = 50;
        Card card;
        for(int j = 0; j < house.size(); j++) {
            card = (Card)house.get(j);
            if(j == 0)
                g.drawImage(cardBack, x, y, this);
            else
                g.drawImage(card.getImage(), x, y, this);
            x += 20;
        x = 80; y = 200;
        for(int j = 0; j < player.size(); j++)
            card = (Card)player.get(j);
            g.drawImage(card.getImage(), x, y, this);
            x += 20;
        g.setColor(Color.white);
        g.drawString("Score: " + score, 345, 15);
    public void reset() {
        player.clear();
        house.clear();
        repaint();
    public void addCard(Card card)
        player.add(card);
        repaint();
    public void addDealerCard(Card card)
        house.add(card);
        repaint();
    private void loadImages() {
        String[] suits = { "c", "h", "s", "d" };
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        MediaTracker tracker = new MediaTracker(this);
        cardBack = toolkit.getImage("cards/00w.gif");
        tracker.addImage(cardBack, 0);
        images = new Image[suits.length * 13];
        int index = 0;
        for(int j = 0; j < suits.length; j++)
            for(int k = 2; k < 15; k++)
                String fileName = "cards/" + k + suits[j] + ".gif";
                images[index] = toolkit.getImage(fileName);
                tracker.addImage(images[index], 0);
                index++;
        try
            tracker.waitForAll();
        catch(InterruptedException ie)
            System.out.println("Image loading in CardTable interrupted: " +
                                ie.getMessage());
class Controller extends JPanel {
    CardTable table;
    Dealer d;
    JButton deal, newcard, stay, exit;
    public Controller(CardTable ct) {
        table = ct;
        d = new Dealer(table, table.images);
        Color c = new Color(0, 0, 100);
        setPreferredSize(new Dimension(400, 40));
        setBackground(c);
        deal = new JButton("Deal");
        newcard = new JButton("New card");
        stay = new JButton("Stay");
        exit = new JButton("Exit");
        deal.setActionCommand("deal");
        exit.setActionCommand("exit");
        newcard.setActionCommand("newcard");
        stay.setActionCommand("stay");
        ActionListener listener = new ChoiceListener();
        exit.addActionListener(listener);
        deal.addActionListener(listener);
        newcard.addActionListener(listener);
        stay.addActionListener(listener);
        add(deal);
        add(newcard);
        add(stay);
        add(exit);
        stay.setEnabled(false);
        newcard.setEnabled(false);
    private class ChoiceListener implements ActionListener {
        public void actionPerformed(ActionEvent event) {
            String ac = event.getActionCommand();
            if(ac.equals("deal")) {
                d.prepareDeck();
                table.reset();
                d.dealCards(2);
                d.dealDealerCards(2);
                stay.setEnabled(true);
                newcard.setEnabled(true);
                deal.setEnabled(false);
                Score s = d.getScore();
                table.setScore(s.getScore());
            if(ac.equals("exit"))
                System.exit(0);
            if(ac.equals("newcard"))
                d.dealCards(1);
                Score s = d.getScore();
                table.setScore(s.getScore());
                if(s.getScore() > 21) {
                    stay.setEnabled(false);
                    newcard.setEnabled(false);
                    deal.setEnabled(true);
                    s.resetScore();
            if(ac.equals("stay"))
                deal.setEnabled(true);
                stay.setEnabled(false);
                newcard.setEnabled(false);
                Score s = d.getScore();
                table.setScore(s.getScore());
class Dealer {
    CardTable table;
    Deck deck;
    Iterator it;
    private int score;
    private int dealerScore;
    Score s;
    public Dealer(CardTable ct, Image[] images) {
        table = ct;
        deck = new Deck(images);
        score = 0;
        dealerScore = 0;
        s = new Score();
    public void dealCards(int j) {
        Card card;
        for(int i = 0; i < j; i++) {
            card = (Card)it.next();
            table.addCard(card);
            if(card.getValue() > 10)
                score += 10;
            else
                score += card.getValue();
        s.setScore(score);
        score = 0;
    public void dealDealerCards(int j) {
        Card card;
        for(int i = 0; i < j; i++) {
            card = (Card)it.next();
            table.addDealerCard(card);
            if(card.getValue() > 10)
                dealerScore += 10;
            else
                dealerScore += card.getValue();
        s.setDealerScore(dealerScore);
        dealerScore = 0;
    public void prepareDeck() {
        deck.shuffle();
        it = deck.getCards().iterator();
    public Score getScore() {
        return s;
class Score {
    private int score;
    public void setScore(int s) {
        score = score + s;
    public void resetScore() {
        score = 0;
    public int getScore() {
        return score;
    private int dealerScore;
    public void setDealerScore(int s) {
        dealerScore = dealerScore + s;
        System.out.println("DEALER: " + dealerScore);
    public void resetDealerScore() {
        dealerScore = 0;
    public int getDealerScore() {
        return dealerScore;
class Deck {
    List cards;
    public Deck(Image[] images) {
        cards = new ArrayList();
        createDeck(images);
    private void createDeck(Image[] images) {
        for(int j = 0; j < images.length; j++)
            int value = j % 13 + 2;
            cards.add(new Card(images[j], value));
    public void shuffle() {
        for(int j = 0; j < 4; j++)
            Collections.shuffle(cards);
    public List getCards() {
        return cards;
class Card {
    private Image image;
    private int value;
    public Card(Image image, int value) {
        this.image = image;
        this.value = value;
    public Image getImage() {
        return image;
    public int getValue() {
        return value;
}

Similar Messages

  • Drawing Multiple Images

    Can anyone tell me why the code below will not work inside a for loop? If I tell my image to be drawn outside of a loop statement it works just fine. However, I need it in a loop because I want the picture to be drawn repeatedly twenty times in xPos+40 increments.
    public void paint(Graphics g){
                       super.paint(g);
                        for(int i=0;i<20;i++){
                             g.drawImage(dot, xPos, yPos, this);
                             xPos=xPos+40;
                 }//close paint

    Your code worked fine. Which makes me wonder if perhaps my problem lies outside of the code snipet that I gave. Could you look at this and see you can find any errors?
    package dots;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Dots{
         //Variables
         private static DotsPanel dPanel;
         private static Image dot;
         private static Image vLine;
         private static Image hLine;
         private static int xPos;
         private static int yPos;
         private static class DotsPanel extends JPanel{
              public DotsPanel(){
                   //call to the parent constructor
                super();
                dot = Toolkit.getDefaultToolkit().getImage("dot.gif");
                vLine = Toolkit.getDefaultToolkit().getImage("vertical.gif");
                hLine = Toolkit.getDefaultToolkit().getImage("horizontal.gif");
                xPos=10;
                yPos=10;
              }//close DotsPanel
                 public void paint(Graphics g){
                       super.paint(g);
                        for(int i=0;i<20;i++){
                             g.drawImage(dot, xPos, yPos, this);
                             xPos=xPos+40;
                 }//close paint
         }//close DotsPanel
         public static void main(String []args){
                 JFrame dFrame = new JFrame("Dots");
                    Container cont = dFrame.getContentPane();
                    dPanel = new DotsPanel();
                    //dPanel.setBackground(Color.black);
                    dFrame.setSize(400, 400);
                    dFrame.setResizable(false);
                    dFrame.setLocationRelativeTo(null);
                    dFrame.setDefaultCloseOperation(dFrame.EXIT_ON_CLOSE);
                    cont.add(dPanel);
                    dFrame.setVisible(true);
         }//close main
    }//close Dots

  • Problem in Loading Multiple image in Single Sprite/MovieClip

    Hi All,
    I am having a killing problem in loading multiple images in single movie clip/sprite using a separate class.
    Here is the ImageLoader.as class
    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(imgHolder:MovieClip, imgObj:Object):void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
                imgMc = imgHolder;
                imgObject = imgObj;
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadProgress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadFailed);
                imgloader.load(new URLRequest(imgObj.FilePath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    //imgLoader=new ImageLoader;
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(target.list_mc.imgholder_mc,imgObj);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;
    In this case, the ImageLoader.as works only on the last movie clip from the for loop. For example, if i am trying to load three image in three movie clips namely img_mc1,img_mc2 and img_mc3 using the for loop and ImageLoader.as, I am getting the image loaded in the third movie clip only img_mc.
    See at the same time, If i uncomment onething in the for loop that is
    //imgLoader=new ImageLoader;         
    its working like a charm. But I know creating class objects in a for loop is not a good idea and also its causes some other problems in my application.
    So, help to get rid out of this problem.
    Thanks
    -Varun

    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
    // better add you movieclip to the stage if you want to view anything added to it.
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(filepath:String):void {
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadPr ogress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadF ailed);
                imgloader.load(new URLRequest(filepath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    var imgLoader:ImageLoader=new ImageLoader();
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(pass the image file's path/name);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;

  • I can't view multiple images in tabbed panels in photoshop CC (do not have this problem in PS5 or 6)

    I can't set up multiple images in tabbed panels in photoshop CC (do not have this problem in PS5 or 6). Has anyone had this problem with CC and if so do they know the fix?

    I just discovered something really weird.  If I open the images in
    photoshop (and the tabs are not showing) and then open another window on
    top of photoshop (for example word or safari) , then the images and tabs
    show in the photoshop window.  But if I move Pshop to the front screen then
    the tabs disappear!

  • Multiple image upload with save to database problem

    I am developing some backend work for a client, and we recently used the Multiple image upload with save to database wizard without a problem. A few days later, we noticed that we could only upload a single file at a time - it seems that the coding is no longer able to access the flash part of this and is using the javasript function instead. I know the web hosting company has made some changes on the server, and I did some reearch and it seems that  there could be an issue with Flash 10, but has anyone else experienced anything like this? Any help is greatly appreciated.
    Thanks.
    Jeremy

    Thank you for the responses. I have already updated awhile ago, so I am wondering what happened. Not sure if during the server update, some files were replaced (unless I totally forgot to update to 1.0.1 on this site). So I reinstalled 1.0.1, deleted the includes folder from the server and uploaded my includes folder and it now works again.
    Again, thanks for the help.
    Jeremy

  • I am having a problem when i open a new tab with multiple images. If there is more than five or six images they won't all open.

    I open emails with multiple images. The new version is having a problem opening a tab with more than maybe 6 or 7 images. Older versions sometimes had the same problem but the unopened images appeared on the page as a small blank box that you could try to reload. Not anymore. Now you have to reload the whole tab. Sometimes this works other times it doesn't.

    You seem to be using a beta version. Maybe go back to a regular release and wait for V. 30 to become a regular release, and maybe whatever bug it is will be fixed.

  • Problem Rating / Deleting Multiple Images

    I have a Problem Rating / Deleting Multiple Images at the same time. For the last 2 weeks I have been unable to select a group of images and rate them all - I have to select images indiviually for the rating to work. This also is the case when trying to delete images.
    Anyone know if this is a bug?

    Hit 'S' which toggles 'Primary Only' mode - this swaps between applying ratings,deletions to multiple images or just the one with the thicker selection border.
    Ian

  • Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns

    Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns
    Hi!
    I've tried to modify the example of  "multiple geometric patterns matching" , and just use two patterns, but when I run the VI this error appear and I doon't know how to solve it! , the error appears in the "IMAQ Learn multiple geometric patterns" block.
    Running on:
    - labview 32 bits
    - windows 7 64 bits
    - usb camera 2.0
    Any sugestion would be helpful..... !  Regards
    Attachments:
    template_12.png ‏150 KB
    template_11.png ‏123 KB
    vision_multiple_pattern_matching.vi ‏127 KB

    thanks all for your replies, the problem was on my template images, I had to give them information about the pattern matching, and I did it with NI Vision Template Editor, within Vision utilities, and I chose template with Feature Based. 
    Thank you again and Regards!

  • Multiple Upload Image Problem - Resize GIF files

    The Multiple Image Upload script seems to handle .jpg images without problems.
    However, .gif files return the error:
    "Error converting image (image resize). Image processing library not available or does not support operation. (imagemagick library is not working or not found)."
    The problem is caused by the fact that script that I'm using tries to pass a parameter that is not valid for gif processing:
    myimage.gif' '-quality' '80'
    The "quality" parameter works only for jpeg and .png files as described here:
    http://www.imagemagick.org/script/command-line-options.php#quality
    Please ensure that the script makes difference between .gif and .jpeg files and use the correct parameters so we can resize the images properly.
    Thanks in advance,
    Márcio

    Hi Marcio,
    >>
    Can you tell me the inconveniance of using GD instead of Imagemagick, or its, shortly similar?
    >>
    sorry, but never worked with ImageMagick so far, so I can´t compare
    >>
    The "quality" parameter works only for jpeg and .png files as described here
    >>
    yeah, it seems that this is a small bug in ADDT´s "includes/common/lib/image/KT_Image.class.php" file. Was just checking the code in there, and indeed it adds this extra parameter regardless the image type -- but I do have an idea how this file can be modified to not use this parameter if the file in question has the suffix ".gif".
    If you feel a little adventurous, I´ll happily invite you to modify some code in this file -- please let me know if you´re ready for some instructions. However, if so, please make a backup of this file first...
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Problem downloading multiple images in bytearray, Help !

    Hi Everyone,
    I m trying to download multiple images on my mobile as a part of my application.
    On server side I have used System.arraycopy to merge arrays..
    What I did on server side is as follows:
    byte[] seperator={'%'};
    totalImageArray=image1+seperator+image2
    Please note everything is in bytearray.
    Now on client side I m not able to extract two images seperately i.e. bytes before seperator and after seperator.
    how do i do byte to byte comparison ?
    Please guide me as to how I should do this..tips links snippet...??
    Message was edited by:
    siddhsdesai

    Wht dont you send images seperate...
    For example first write the size of first image as bytes and than write the first image. Then write the size of second image as bytes and than write the second image.
    In the client side first read the first number and then read as many as that bytes then create first image. Then read the second number and then read as many as that bytes then create second image.
    Server Side...
    DataOutputStream toClient = new DataOutputStream (....);
    toClient.writeInt(...); //send the sizeof first image as bytes
    toClient.write(...);  //send the first image as byte array
    toClient.writeInt(...); //send the sizeof second image as bytes
    toClient.write(...);  //send the first second as byte array
    toClient.flush();Client Side...
    DataInputStream fromServer= new DataInputStream (....);
    int firstsize=fromServer.readInt(); //read the sizeof first image as bytes
    byte[] image1data=new byte[firstsize]; //image1 buffer
    fromServer.readFully(image1data);  //read the first image as byte array
    int secondsize=fromServer.readInt(); //read the sizeof second image as bytes
    byte[] image2data=new byte[secondsize]; //image2 buffer
    fromServer.readFully(image2data);  //read the second image as byte array

  • Multiple image upload with save to database wizard problem

    hi,
    i need to upload multiple images (6) in a table called pictures. i will need the names stored in the database and the files uploaded on the server. since i am new to dreamweaver i can not figure out on how to make this work.
    the multiple image upload wizard uploads the images fine and creates a subfolder with the right id but i have no file names in the database at this point. i tried the multiple image upload with save to database wizard but i only get one upload button. it worked fine with one image but i need 6 pics uploaded. the i tried to first upload the pictures with the multiple image upload wizard and use the update wizard to add the names afterwards but that did not work either. hmm. would be great if someone could help me out.
    thanks, jan

    Thank you for the responses. I have already updated awhile ago, so I am wondering what happened. Not sure if during the server update, some files were replaced (unless I totally forgot to update to 1.0.1 on this site). So I reinstalled 1.0.1, deleted the includes folder from the server and uploaded my includes folder and it now works again.
    Again, thanks for the help.
    Jeremy

  • HELP! Multiple Image swap restore problem

    Hey, Im interested in learning how to perform a multiple image swap restore.
    I've made a central image swap, and I want to make a few others happen on the same 'mouseover'. All done, simple. However, only the last image swap will 'restore' to the original image, and all the rest stay the same. I've ticked 'restore on mouseover' on all of the behaviours, but its so frustrating - please help me.

    This is actually really easy. Setup one swap image, then double click swap image in behaviours. The asterix indicates what image is being swapped but you can add more then one. So simply select the second image you want to change at this point and another asterix will appear. Muiltiple swap actions can be applied using one swap image command.

  • Multiple Image Adjustment Problem

    I used to be able to select a range of images and then change the exposure on all of them simultaneously.  Now when I select a range of photos, only one has a thicker white border, the rest have a thinner border.  And when I apply exposure change (or any adjustment) it only affects the thicker photo.  All the rest are unchanged. 
    I do not have Edit Primary selected. 
    This is a recent phenomenon.  Any help would be greatly appreciated.
    Cheers

    The Image with the thicker border is called the "Primary Selection".
    The tool that toggles between all selected Images and the Primary Selection is called "Primary Only".
    Afaik, changes made with the sliders and other controls in the Adjustment Bricks on the Adjustment tab of the Inspector affect only the Primary Selection.  (The same is true of changes made on the Metadata tab of the Inspector.)  I have never seen any other behavior.
    Commands issued from the Menu or with keyboard shortcuts affect all selected Images, unless "Primary Only" is set to "on".
    How were you applying exposure changes to multiple images in the past?

  • Multiple image upload problem

    When trying to use the Multiple Image Upload feature I get this error
    A script in this movie is causing Flash Player 9 to run slowly, if it continues your computer may become unresponsive. Do you want to abort the script?
    This message pops up after a single file is uploaded, the second bar labeled progress remains at 0%.
    I have experimented with this all day with no luck, any help would be great...
    Forgot to mention, PHP/MYSQL
    Also happens if I try multiple file upload vs. image.
    I can't tell if it's ADDT or Flash, hopefully since they are both adobe someone can figure it out.
    Thanks in advance...

    Thanks for the reply, in this case it was a server setting that had to be modified. Mod_security would not allow folder creation by Apache. The single up loadd worked fine because it did not have to write a directory.
    It did not show up in the server logs for some reason.
    Hope this saves someone hours of trouble shooting.

  • Multiple images in pscs5 when importing from bridge

    Hi Guys
    Hope someone can throw some light on my problem?
    When I bring an image from bridge into photoshop CS5 the image sometimes (more than I would like) breaks up into multiple images in the same window. (see attached example). It was suggested that my video driver may need updating but on checking I have the latest drivers!
    This problem has only been happening for about a month and  everthing was working fine before that. Im running win7pro 64 bit and am running photoshop from my ssd drive. The display driver is a Nvidia Geforce 240 which again has been fine previously. Would it be worth unistalling/reinstalling the program, just a thought!
    Any help from you guys would be more than welcome.
    Thanks trev

    Chris and Noel
    Thank you both for your advice. Chris I tried the update driver from Nvidias web site and it also said that my driver was uptodate 'do you want install anyway' which i did! It made a slight difference but still the problem showed up, so I disabled the Open gl drawing box in preferences menu and then reset it changing the advanced setting to normal in the advanced menu. This seemed (not holding my breath) to have done the trick! and Noel I saw the option for what you have said but I didnt have the confidence to go manual, that'll be my plan B.
    Thanks again guys, I'll be back for more advice
    Trev

Maybe you are looking for

  • Unexpected Behavior error while creating a connection in IDT

    Hi Everyone, I have created a connection on top of a database using ODBC. I could able to see the connection in IDT. I have mentioned the user name and pw correctly  and tried testing the connection and got the error "unexpected behavior" PFA error.

  • I have bent on my ipod touch 4g on the back side

    i live in india and i have any ipod touch 4g and i recently got a den an scratches  on it so is there anyway to change the back or replace it i have the apple protection plan so will i get a replacement and my ipod works great it have no effect on th

  • Non Modal Window Popup BSP View

    Hi, I have a requirement to launch a pop up window which will allow the user to access the original screen from which the pop up was launched (i.e. a non modal window). The pop up window contains a calculator with the intention being that the user wo

  • Cost in proof of delivery

    Hello.  I need using POD (Proof of delivery), but when the customer confirm below quantity than delivery, i have a problem in cost because the good movement impute for all quantity in the same cost center but i need to impute in others cost center th

  • Router giving error message "esw_mrvl_vlan_port_remove"

    Dear All, In one of our newly purchased Cisco Routers, I am getting the below error message : esw_mrvl_vlan_port_remove : Unable to find entry for VLAN(1) dbnum(1) esw_mrvl_vlan_port_remove : Unable to find entry for VLAN(1) dbnum(1) 000083: .Aug 21