C'mon anyone ...help in resizing images

nobody seems to know how to resize zoom in\zoom out images. can anyone please help

Are you trying to physically change the dimensions of the image? Or, do you just want to have the image appear larger on the screen?

Similar Messages

  • Can anyone help in resizing the JLabel object

    Hi,
    can anyone help me in resizing the JLabel object after being dropped onto the DropContainer. I'm providing the code below
    import javax.swing.*;
    import java.awt.*;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.datatransfer.UnsupportedFlavorException;
    import java.awt.dnd.*;
    import java.io.File;
    import java.io.Serializable;
    import java.awt.event.*;
    import java.awt.Insets;
    import java.awt.Dimension;
    public class project2 extends JApplet implements Runnable{
    private DragContainer dragcontainer;
    private DropContainer dropcontainer;
    private DefaultListModel listModel,listModel1;
    public void start() {
    Thread kicker = new Thread(this);
    kicker.start();
    public void run() {
    project2 dndapplet = new project2();
    dndapplet.init();
    public void init() {
    try {
    getContentPane().setLayout(new BorderLayout());
    listModel = new DefaultListModel();
    dragcontainer = new DragContainer(listModel);
    getContentPane().add(BorderLayout.WEST, new JScrollPane(dragcontainer));
    listModel1=new DefaultListModel();
    dropcontainer = new DropContainer(listModel1);
    getContentPane().add(BorderLayout.CENTER,new JScrollPane(dropcontainer));
    catch (Exception e) {
    System.out.println("error");
    fillUpList("images");
    setSize(700, 300);
    public static void main(String[] args) {
    Frame f = new Frame("dndframe");
    project2 dndapplet = new project2();
    //Point pos=new Point();
    f.add(dndapplet);
    dndapplet.init();
    dndapplet.start();
    f.show();
    private void fillUpList(String directory) {
    File dir = new File(directory);
    File[] files = dir.listFiles();
    for (int i = 0; i < 11; i++) {
    listModel.addElement(new ImageIcon(directory + "\\" + files.getName()));
    class Cursor extends Object implements Serializable
    public static final int SE_RESIZE_CURSOR=0;
    int cursor;
    public Cursor(int SE_RESIZE_CURSOR)
    cursor=SE_RESIZE_CURSOR;
    class ImageTransferable implements Transferable, Serializable
    ImageIcon imageIcon;
    public static final DataFlavor IMAGE_FLAVOR = DataFlavor.imageFlavor;
    public DataFlavor[] getTransferDataFlavors()
    return new DataFlavor[] {IMAGE_FLAVOR};
    public ImageTransferable(ImageIcon imageIcon)
    this.imageIcon = imageIcon;
    public Object getTransferData(DataFlavor f) throws UnsupportedFlavorException
    if (!isDataFlavorSupported(f))
    throw new UnsupportedFlavorException(f);
    return imageIcon;
    public boolean isDataFlavorSupported(DataFlavor aFlavor)
    return IMAGE_FLAVOR.equals(aFlavor);
    class DragContainer extends JList implements DragGestureListener, DragSourceListener
    private DragSource iDragSource = null;
    public DragContainer(ListModel lm)
    super(lm);
    iDragSource = new DragSource();
    iDragSource.createDefaultDragGestureRecognizer(this,DnDConstants.ACTION_COPY_OR_MOVE, this);
    public void dragGestureRecognized(DragGestureEvent aEvt)
    ImageIcon imageSelected = (ImageIcon) getSelectedValue();
    ImageTransferable imsel = new ImageTransferable(imageSelected);
    if (imageSelected != null)
    System.out.println("startdrag...");
    iDragSource.startDrag(aEvt, DragSource.DefaultCopyNoDrop, imsel, this);
    else
    System.out.println("Nothing Selected");
    public void dropActionChanged(DropTargetDragEvent event)
    public void dropActionChanged(DragSourceDragEvent event)
    public void dragDropEnd(DragSourceDropEvent event)
    public void dragEnter(DragSourceDragEvent event)
    public void dragExit(DragSourceEvent event)
    public void dragOver(DragSourceDragEvent event)
    DragSourceContext context = event.getDragSourceContext();
    context.setCursor(null);
    context.setCursor(DragSource.DefaultCopyDrop);
    class DropContainer extends JList implements DropTargetListener,MouseListener
    private DropTarget iDropTarget = null;
    private int acceptableActions = DnDConstants.ACTION_COPY_OR_MOVE;
    JLabel imgLabel=null;
    public int dropX;
    public int dropY;
    public int x;
    public int y;
    public DropContainer(ListModel lm1)
    super(lm1);
    iDropTarget = new DropTarget(this, this);
    setBackground(Color.white);
    public void drop(DropTargetDropEvent aEvt)
    Point location=null;
    ImageIcon icon=null;
    Transferable transferable=null;
    //int dropX=0;
    //int dropY=0;
    try
    transferable = aEvt.getTransferable();
    location=new Point();
    if(transferable.isDataFlavorSupported(ImageTransferable.IMAGE_FLAVOR))
    aEvt.acceptDrop(acceptableActions);
    icon = (ImageIcon)
    transferable.getTransferData(ImageTransferable.IMAGE_FLAVOR);
    setLayout(null);
    imgLabel=new JLabel();
    imgLabel.setIcon(icon);
    imgLabel.addMouseListener(this);
    location=aEvt.getLocation();
    dropX=location.x;
    dropY=location.y;
    imgLabel.setBounds(dropX,dropY,icon.getIconWidth(),icon.getIconHeight());
    this.add(imgLabel);
    SwingUtilities.updateComponentTreeUI(this.getRootPane());
    aEvt.getDropTargetContext().dropComplete(true);
    else
    System.out.println("rejecting drop");
    aEvt.rejectDrop();
    aEvt.getDropTargetContext().dropComplete(false);
    catch (Exception exc)
    exc.printStackTrace();
    aEvt.rejectDrop();
    aEvt.getDropTargetContext().dropComplete(false);
    finally
    location=null;
    transferable=null;
    icon=null;
    imgLabel=null;
    public void mousePressed(MouseEvent e)
    x=e.getX();
    y=e.getY();
    public void mouseReleased(MouseEvent e)
    int temp1,temp2;
    temp1=y;
    temp2=x;
    imgLabel.setSize(temp1,temp2);
    public void mouseEntered(MouseEvent e) {}
    public void mouseExited(MouseEvent e) {}
    public void mouseClicked(MouseEvent e) {}
    public void dragEnter(DropTargetDragEvent event)
    System.out.println("dragenter");
    event.acceptDrag(acceptableActions);
    public void dragExit(DropTargetEvent event)
    System.out.println("dragexit");
    public void dragOver(DropTargetDragEvent event)
    System.out.println("dragover");
    event.acceptDrag(acceptableActions);
    public void dropActionChanged(DropTargetDragEvent event)
    System.out.println("dropactionchanged");
    event.acceptDrag(acceptableActions);
    }//class DropContainer

    Hi all,
    I have two classes, say 1st and 2nd.
    I have created an object of the second class in the first class and also i have invoked a method of the second class using it's object from the first class.
    but when i compile the first class i'm getting an error that "cannot access the second class".
    can anyone help me in fixing this problem
    thanks in advance
    murali

  • I am trying to make a signature in MS Word (2007) which includes a jpg image, but when I save it as a HTML file and attach it the text appers OK but the image doesn't. I have tried various formats but still no luck. Can anyone help?

    I am trying to make a signature in MS Word (2007) which includes a jpg image, but when I save it as a HTML file and attach it the text appers OK but the image doesn't. I have tried various formats but still no luck. Can anyone help? edit

    C'mon! Anyone???? I'm desperate!

  • Help please on image resizing

    How do you resize images (I can't find anything in the APIs).
    At the moment I have an application with an inherited layeredPane and images (from inherited JLabels) drawn on top.
    The pane currently has no layout, if I resize the application everything else resizes but the images stay the same.
    Would anyone be able to show me what I have to change to enable the images to resize, help would be appreciated.
    public class BoardPanel extends JLayeredPane
        public BoardPanel()
        //Overwrite abstract painting method
        public void paintComponent(Graphics g)
            super.paintComponent(g);
            //draw Image at size of panel starting at 0,0
         g.drawImage(backgroundImage,0,0,this.getWidth(), this.getHeight(), null);
        private Image backgroundImage = new ImageIcon("./Images/Board.gif").getImage();
    public class PieceIcon extends JLabel
        //Create new image with the piece (symbol) chosen by the player
        public PieceIcon(String symbol,int pNum)
            playerNumber = pNum;
            pieceImage = new ImageIcon("./Images/"+symbol+".jpg").getImage();
            setOpaque(false);
        public void paintComponent(Graphics g)
           super.paintComponent(g);
           g.drawImage(pieceImage,boardPos[0][(MainFrame.getPlayer(playerNumber).getCurrentBoardPos())],
                                  boardPos[1][(MainFrame.getPlayer(playerNumber).getCurrentBoardPos())],this);
        private Image pieceImage;
        private int playerNumber;
        private static int[][] boardPos = //load of absolute values, change to proportionate values if images can be resized
    public class MainFrame extends JFrame
        /** Creates new form JFrame */
        public MainFrame()
            initGUI();
            pack();
        private void initGUI()
           //create components and add to frame, including:
            JPanel content = new JPanel();
            getContentPane().add(content, java.awt.BorderLayout.CENTER);
            content.add(boardIcon, java.awt.BorderLayout.CENTER);
            //Create the board Pane
               boardIcon.setPreferredSize(new java.awt.Dimension(500,500));
            //start at (x,y) 0,0, with height/width (600,600)
                boardIcon.setBounds(0,0,600,600);  //does this have to be set again if window is resized?
            boardIcon.setLayout(null);      
        public void createPieces()
           //method called in main once player names and details have been enterd
           playerPieces = new PieceIcon[this.getNumPlayers()];
           for(int i=0; i<this.getNumPlayers(); i++)
              //Create new icon with players piece selection and number selection
              playerPieces[i] = new PieceIcon(this.getPlayer(i).getPiece(),i);
             //Add piece at depth of '10' (default layer is 0 so just above other board components)
             boardIcon.add(playerPieces,new Integer(10));
    //label size of board, piece drawn at specific point within board
    playerPieces[i].setBounds(0,0,boardIcon.getHeight(),boardIcon.getWidth());
    private static BoardPanel boardIcon = new BoardPanel();
    private PieceIcon[] playerPieces;
    Thanks in advance

    You need to use g.drawImage(image, dest.x, dest.y, dest.width, dest.height, source.x, source.y, source.width, source.height, null)
    It's in the Graphics API. It will scale the image on the fly. The destination coordinates should be the panel you want to paint on.

  • I have a MacBook Pro with Snow Leopard. After connecting my HP Photosmart D110 to it, the printer works but the scanner doesn't. The message is"The scan cannot be performed because another program has control of the HP imaging device". Can anyone help?

    I have a MacBook Pro with Snow Leopard. After connecting my HP Photosmart D110 to it, the printer works but the scanner doesn't. The message is"The scan cannot be performed because another program has control of the HP imaging device". Can anyone help?

    Found the answer on the HP site. It's the original software that works with this printer OS X 10.6!!
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en &cc=us&prodTypeId=18972&prodSeriesId=3558902&prodNameId=3562006&swEnvOID=219&swL ang=8&mode=2&taskId=135&swItem=ma-60835-3

  • Need help on quality of resized image!!

    I am required to resize images to max 1240pixel (longest dimension) as a submission of work, though when work is viewed it will be at 30"x40".  Can not figure out a way to do this where images don't become quite pixelated when viewed at larger size.   Appreciate any suggestions. 

    Is there some software to verify if my graphics card is shotty?
    Techtool Pro has some testing, the AHT tests VRAM, but game benchmarks and stressing will tell you the most.
    Is re-seating the graphics card or memory worth trying?
    Absolutely. Just don't reinstall the graphics card until you clean it thoroughly.
    Cleaning the dust out of my machine?
    YES. A dust filled graphics card heatsink will cause the GPU to cook, and cause problems thet you describe.
    If I need a new graphics card, what are my options? Do I have to purchase it via Apple store? I would like to stick with an Nvidia card so am I stuck buying the same card I currently have or can I upgrade?
    You don't have to buy from Apple, but using with OS X limits your choices to Mac compatible or flashable PC versions.
    There is an awful lot of user input into this topic here:
    http://blog.macsales.com/602-testing-those-new-graphics-cards
    Card reviews can also help:
    http://www.anandtech.com/video/showdoc.aspx?i=3140&p=9
    http://www.tomshardware.com/reviews/radeon-hd-4870,1964.html

  • I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated.

    I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated. Heres an image of before and after. The first image I use is a JPG 72dpi 1500px x1500px and I want to downsize it to 600x600px same res, but it keeps pixelating, this has never happened before. Any suggestions, thoughts?
    thanks!

    I wouldn't say pixelated; more like blurry.
    Like ConnectedCreative said, what steps are you using? Are you using "bicubic sharper" when resizing down?

  • HT201250 My Time Machine is not backing up and gives me this error report, 'The backup disk image "/Volumes/Data/Valarie'siMac.sparsbundle" is already in use.  Time machine could not complete backup.    Can anyone help me?

    My Time Machine is not backing up and gives me this error report:
    The backup disk image "/Volumes/Data/Valarie'siMac.sparsbundle" is already in use
    Time Machine could not complete backup
    Can anyone help me?

    Look at the discussion on the following forum:
    https://discussions.apple.com/thread/3882138?start=0&tstart=0
    The responses given there may help.

  • I have images in aperture and in my picture folder that I want to burn to DVD. I need them to be viewable on pc and possibly via a DVD player. My first attempt proved to work only mac. Can anyone help?

    Can anyone help me with burning DVD with images in Aperture and picture folder. I need the to be viewable on pc and DVD player if possible.
    My first attempt only works on mac.

    Eh la Pastenague! Je savais que tu était léthale pour l'homme mais ce sont pluôt les machines à pommes qui devraient te craindre. Merci! Solved. 
    For future reference.
    My TC is a 3rd gen.
    I actually had to reset to standard defaults not only once but twice. The first time I simply returned to my old profile but that only led to the same message error on the network settings (i.e. IP by default, cannot connect to the internet). Therefore the second time around I kept my profile as backup and re-created a new one plus a guest one.
    The airport utility then signaled to issues remaining:
    1) Internet access was cut - this I solved by simply reseting the cable modem
    2) There were no DNS Servers - I simply copied the ones I had from the previous setup and it worked
    I did have AppleCare....
    I'm online again and I hope for good.
    Thanks a lot
    PS. a small tip - I made captures of all my settings in Network settings, Airport Utility and Network utility using Grab in case of ... if anything it is just handy to get back settings that your are missing when setting up a new configuration

  • Just upgraded Elements 9 to 10.  my Neat Image plugin did not carry over.  Can anyone help me?

    Just upgraded Elements 9 to 10.  My neat image plugin did not carry over.  Can anyone help me?

      Go to Program Files or on 64 bit systems Program Files (x86) and find the file NeatImage.8bf in the PSE9 plug-ins folder. Copy it to the PSE10 plug-ins folder.
    Alternatively go to Program Files\Neat Image and copy the file from the source.
     

  • Help in resizing an image

    I am an artist thatI needs to resize images in order to send them for review for art shows and reviews.  An example is one file that is currently 3600 x 2736 px with a resolution of 180  - the size needs to be reduced to 600 x 800 px but the resolution needs to be increased to 300.
    Is there a correct way to go about this, can I accomplish both at the same time
    Do I check the boxes for    _ Scale Styles
                                            _Resample Image
                                            _Constrain Proportions
    I want to make sure that I am not harming the image.
    Also, when I download my photos with the digital camera card, they are always loaded as 180 dpi.  Is that a default setting on Elements or is is the camera setting?
    Thanks for any advise, like many artists, I am not very savvy with the computer or software stuff.
    Help is much appreciated!

    What I had to do to resize my images that I wanted to send off for printing was to click on the following:
    Full Phot Edit
    Image
    Resize
    Image Size
    Change Resolution to 300 ppi
    Save as baseline standard
    Then export the Jpeg.
    The company wanted my photos at least 300 ppi for best quality.  I don't think she cared about the pixel size, but I guess you could change that as well.  Hope this helps a little.  Took me days to figure out how to send off for printing.

  • Does anyone resize images to fit InDesign Rectangle Frame tool?

    My question is based on some booklets that we have created in the past. We have some very large images all 300 ppi, but when shrunk down they tend to have an effective ppi of 500 or greater. Part of me feels that when the effective dpi is large, that I should go back into photoshop and resize those images, hopefully saving the size of the PDF file after exporting. So, my questions are one, does anyone even resize images anymore to fit the rectangle frame to keep ppi around 300 or two, do they not do this anymore and let InDesign handle this process when exporting to PDF?
    Thanks Everyone,
    Mike

    Better quality is to resize in Photoshop and sharpen there, because InDesign has no choice of the method of sharpening. But to be honest, in the majority o cases I do resampling in InDesign when exporting to PDF.

  • When I try to open images I am getting this message: "The file "image.jpg" couldn't be opened because you don't have permission to view it." "Which I've tried - but it's not responding, plus its with all images now. Can anyone help?

    When I try to open images I am getting this message: "The file “image.jpg” couldn’t be opened because you don’t have permission to view it." "Which I've tried - but it's not responding, plus its with all images now. Can anyone help?

    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.iBooksX
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Quit the application if it's running. Move the selected item to the Trash. Relaunch the application and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • I tried updating to os 4.3.3 but Tsed update incomplete due to error. I am now stuck with image of usb and ITunes on IPad. I cannot reboot it or connect to computer. Can anyone help?

    I tried installing os 4.3.3 but ITunes advised of error before completing. I am now left with image on screen of 'usb to be linked with ITunes'. I cannot reboot my IPad or connect with ITunes to re-sync. Can anyone help? Thank you

    I have encountered this problem with my first IPAD2 and brought it back to the Apple Store.  They gave me a new one and I used it for a few weeks and my MIC was not working so I decided to try and install the update.  I hard wired my laptop this time and again I had the same error.  The IPAD2 froze so I went back to the Apple Store and they tried to fix the problem.  They could not.  So they are going to give me another new one.  I asked them what the problem could be and they said it was my computer and I should select the download and not the download and install. But to be honest I do not remember I had that option.  When I get my new one, I will see if I get the option to select how I  update my IPAD.   I also saw  a message on this site that suggested closing all security programs before attempting to updat the software.  I did ask the apple rep when I returned my IPAD today if the security programs would interfer with the update.  They said no, but I will try anything to get the update to work.  If you find an answer let me know

  • I was changing my desktop screen saver in system preferences screen protection.  Now it says it is "Loading Images" and won't stop.  The Colourful wheel goes around for ever and It does not stop. Can anyone help me?

    I was changing my desktop screen saver in system preferences>screen protection.  Now it says it is "Loading Images" and won't stop.  The Colourful wheel goes around for ever and It does not stop. Can anyone help me?

    Welcome to the Apple Support Communities
    I have seen a lot of cases like your issue, and it's easy to solve.
    First, open Disk Utility, select Macintosh HD in the sidebar and repair permissions. Sometimes, a permission can be damaged and it makes that an application doesn't work properly.
    If that doesn't work, open Finder, select Go menu > Go to Folder, type ~/Library/Prefereces, delete "com.apple.desktop.plist" and "com.apple.systempreferences.plist" and restart

Maybe you are looking for

  • How can i get sound on BOTH imac and apple tv

    The sound works fine on the apple tv Television but goes off on the iMac Video works on both, so How do I get sound on Both when mirroring?

  • Displaying Images In Dreamweaver

    when I view an page in either SPLIT or DESIGN view using Dreamweaver 8 it does not display the actual images or embedded video instead it shows the outline of the image as a grey box. I know it can be done but cannot find the option to display. How c

  • ASA5505 L2L VPN does not function after move and reconfiguration

                       I have an ASA5505 that had multiple VPNs to both Cisco5505's and other Vendor security appliances.  The one in question that moved to a new IP address checks out on isa sa, ipsec sa and nat, yet there is no communication accross th

  • ON_DATA_CHECK not getting triggered on deletion of row

    Hi, I have implemented a method which triggers the on_data_check event of the ALV. I have a Save button from where I am calling the data_check method. The issue I am facing is that when I edit the content of a cell and click Save then the on_data_che

  • Airport Express Why only iTunes

    I would like to play Quicktime sounds thro my airport express and my fantastic Bose speakers system. But the computer will only play thro iTunes. Even then it does not play itune videos thro the airport express but rather thro the computers own speak