Help! Need to enlarge an image within document

Hi
Can anyone help? I need to enlarge an image within document.
Not zoom, but physically enlarge the dimensions of an image to fit
the page. Right now, it is a 3 x 5 image but I need to get it
closer to 11 x 17
thanks in advance

{color:red}CROSS POSTED{color}
{color:0000ff}http://forum.java.sun.com/thread.jspa?threadID=5260569
{color}
Cross posting is rude.
db

Similar Messages

  • [HELP] need TX2 recovery DVD/Image

    [HELP] need TX2 recovery DVD/Image HP won't repair it b/c i dont have the original software....can someone provide me an image or i will pay $ for DVD plz full model is TX2-1024CA

    That is a notebook PC. Maybe this document will help? http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00810334&cc=us&dlc=en&lc=en&jumpid=reg_R1002_US...
    ... an HP employee expressing his own opinion.
    Please post rather than send me a Message. It's good for the community and I might not be able to get back quickly. - Thank you.

  • Guys i need to get m itunes account unlocked its stopping mefor making in app purchases please help need to make a purchase within 30 minutes

    guys i need to get my itunes account unlocked its stopping mefor making in app purchases please help need to make a purchase within 30 minutes

    If you've tried to buy something and your've been charged for it (and it's not a temporary store holding charge) but haven't received it then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Help needed for downloading the image from Inage URL

    Hello everyone,
    I need some help regarding setting a timeout for dowloading image from image URL
    Actually I have a hash table with set of image URL's...
    for example:
    http://z.about.com/d/politicalhumor/1/0/-/6/clinton_portrait.jpg
    which gives a image.
    for(Enumeration e = google_image_links.elements() ; e.hasMoreElements() ;) {
                                      //System.out.println("final");
                                       //System.out.println(e.nextElement());
                                       try{
                                            System.out.println("Images download started....");
                                            //System.out.println(e.nextElement());
              //imageio is the BufferedImagereader object     
                                               imageio = ImageIO.read(new URL((String) e.nextElement()));
                                            image_title = created_imagepath +"\\"+ array_words[i] + counter_image_download + "." + "jpg";
                                            img = ImageIO.write(imageio,"jpg", new File(image_title));     
                                            imageio.flush();
                                       }catch(Exception e1){
                                            System.out.print(e1);
                                       if(img){
                                            System.out.println("The image " + image_title + " has been saved to local disk succesfully.");
                                       counter_image_download++;
                                  }//end of for loopi am using the above code to download all the image from the Image URL's that r present in hashtable.
    The problem i have been encountered with is...
    Some URL's does not return any bytes, The code is not totally broken. In such cases, my code is hanging off at that particular URL and waiting to get some output data from the URL. The execution does not proceed furthur But if the URL is a totally broken link, the code is throwing an exception and I am able to handle it successfully.
    But in the case of partially broken links, I am not able to go furthur because the code keeps waiting to get some data.
    So for this reason I want to setup a timer and tell the code to wait for 5-10 min, in that time if it does not get any data, proceed furthur to download other links...
    Please tell me how can I do this.. or plzzz tell me an alternative...
    Please help me ans its a bit urgent plzzzz.
    Thank you,
    chaitanya

    Hello everyone,
    I need some help regarding setting a timeout for dowloading image from image URL
    Actually I have a hash table with set of image URL's...
    for example:
    http://z.about.com/d/politicalhumor/1/0/-/6/clinton_portrait.jpg
    which gives a image.
    for(Enumeration e = google_image_links.elements() ; e.hasMoreElements() ;) {
                                      //System.out.println("final");
                                       //System.out.println(e.nextElement());
                                       try{
                                            System.out.println("Images download started....");
                                            //System.out.println(e.nextElement());
              //imageio is the BufferedImagereader object     
                                               imageio = ImageIO.read(new URL((String) e.nextElement()));
                                            image_title = created_imagepath +"\\"+ array_words[i] + counter_image_download + "." + "jpg";
                                            img = ImageIO.write(imageio,"jpg", new File(image_title));     
                                            imageio.flush();
                                       }catch(Exception e1){
                                            System.out.print(e1);
                                       if(img){
                                            System.out.println("The image " + image_title + " has been saved to local disk succesfully.");
                                       counter_image_download++;
                                  }//end of for loopi am using the above code to download all the image from the Image URL's that r present in hashtable.
    The problem i have been encountered with is...
    Some URL's does not return any bytes, The code is not totally broken. In such cases, my code is hanging off at that particular URL and waiting to get some output data from the URL. The execution does not proceed furthur But if the URL is a totally broken link, the code is throwing an exception and I am able to handle it successfully.
    But in the case of partially broken links, I am not able to go furthur because the code keeps waiting to get some data.
    So for this reason I want to setup a timer and tell the code to wait for 5-10 min, in that time if it does not get any data, proceed furthur to download other links...
    Please tell me how can I do this.. or plzzz tell me an alternative...
    Please help me ans its a bit urgent plzzzz.
    Thank you,
    chaitanya

  • Help needed to add an image to a datagrid cell in actionscript

    Morning all,
    I am still quite new to flex development and I have an application which uses xml to populate a datagrid. One of the row columns should display a small image but I don't know how to do that.
    Can anyone show me how to add an image to a datagrid cell in actionscript?
    I've added a sample of the code I have written already below. Any help would be much appreciated.
    Thanks in advance,
    Xander
    My XM
    <?xml version="1.0" encoding="UTF-8"?>
    <dataset>
    <modules>
    <module id="1">
    <icon>assets/sample_image1.png</icon>
    <key>core</key>
    <name>Core</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 15:59 UK</installed>
    </module>
    <module id="2">
    <icon>assets/sample_image2.png</icon>
    <key>webproject</key>
    <name>Web Project</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 17:32 UK</installed>
    </module>
    </modules>
    </dataset>
    My Actionscript
    private function dataSetHandler(event:Event):void {
        var ds:XML = new XML(event.target.data);
        var rows:XMLList = ds.elements('modules').elements('module') as XMLList;
        var columns:Array = new Array();
        for (var i:int=0; i<rows[0].elements().length(); i++) {
            var column:DataGridColumn = new DataGridColumn();
            var tag:String = rows.*[i].name();
            column.headerText = rows.*[i].name();
            column.dataField = rows.*[i].name();
            if (tag == 'icon') {
                var img:Image = new Image();
                img.id = "iconpath";
                img.width = 23;
                img.height = 20;
                img.source = rows.*[i].name();
               column.itemRenderer = img;   <-- this line shows as an error when I try to compile
            columns[i] = column;
        mydatagrid.columns = columns;
        mydatagrid.dataProvider = rows;

    you cant just set image object to itemrenderer, you need to use classfactory.
    http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_4.html

  • Help needed in designing dynamic images

    Hi,
    I just posted a thread before, but there is something wrong in that post.
    Any ways, I am new to Java and am trying to design a GUI which has images, which change dynamically. One of the examples is on this webpage
    http://images.google.com/imgres?imgurl=http://www.snapstream.com/images/blog/godzilla/overheating_max_cpu_tn.jpg&imgrefurl=http://blogs.snapstream.com/2006/01/18/godzilla-pvr/&h=516&w=683&sz=80&hl=en&start=3&tbnid=huDY6gDdtS_o-M:&tbnh=105&tbnw=139&prev=/images%3Fq%3DCPU%2Btemperature%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG
    I need help desperately. I would appreciate, if you can help me. What do i need to use? Can it be done by using Swing? Are there any good examples of it on web? I am basically not clear, what do I need to use...
    waiting for your reply. thanks in advance.
    Ankit

    consider you have a JFrame called "frame"
    what you can do:
    JLabel lab = new JLabel("../firstPic.jpg");
    frame.getContentPane().add(lab);
    then, each time you will call "setIcon()" on the lab and refresh the frame it will display a new picture

  • Help Needed! To upload image to db2 using struts & hibernation[code inside]

    Hi all, currently i have successfully created the application for inserting text data into my db2 through the use of struts with hibernation. But i need to insert image now which seems to be different from just inserting text data.
    From my understanding, the image will be converted to bytes and store as Blob in my db2, but i need hlp in knowing how to do this, i did a search and i found the following codes posted by another guy in this forum but he did not reply his thread at all...i am feeling very puzzel about the last file which is /RegPersonalDetails.java. Did he missed out a bean file?? which is the TempPhoto bean? i really do not understand the last file, The first file is the JSP , the second is the bean and the third is the Action class. i did exactly the same as his but i do not know how to use the RegPersonalDetails.java. please help thanks.. i am using websphere studio 5 and hibernate 2.
    Below is the example i got from the guy:
    //Registration.jsp
    --Below is the script for image type validation.
    <script>
    var fileTypes=["bmp","gif","png","jpg","jpeg","tif","tiff","jif","jfif","jp2","jpx" ,"j2k","j2c","fpx","pcd" ];
    function preview(what){
    var source=what.value;
    var ext=source.substring(source.lastIndexOf(".")+1,source.length).toLowerCase();
    for (var i=0; i<fileTypes.length; i++) if (fileTypes==ext) break;
    var globalPic=new Image();
    if (!(i><fileTypes.length)){
    alert("THAT IS NOT A VALID IMAGE\nPlease load an image with an extention of one of the following:\n\n"+fileTypes.join(", "));
    what.fileUpload.focus();
    return false;
    else
    return true;
    </script>--You have to write relevent code for view.For browse filed i given below
    <INPUT type=file name="fileUpload" onchange="preview(this)">
    ===============================================================
    //RegistrationForm.java
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class Regstep5Form extends ActionForm {
    private FormFile fileUpload;
    public FormFile getFileUpload() {
    return fileUpload;
    public void setFileUpload(FormFile fileUpload) {
    this.fileUpload = fileUpload;
    ===================================================================
    //RegistrationAction.java
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.upload.FormFile;
    public class Regstep5Action extends Action {
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws Exception, ServletException {
    Regstep5Form rf= (Regstep5Form)form;
    FormFile myFile = rf.getFileUpload();
    String contentType = myFile.getContentType();
    String fileName = myFile.getFileName();
    int fileSize = myFile.getFileSize();
    byte[] fileData = myFile.getFileData();
    String result=RegPersonalDetails.process(rf);
    System.out.println("result taken");
    return mapping.findForward("success");
    ===================================================================
    //RegPersonalDetails.java
    import com.model.orm.TempPhoto;
    import com.util.HibernateUtil;
    import org.hibernate.*;
    import java.io.*;
    import org.apache.struts.upload.*;
    public class RegPersonalDetails {
    public static String process(Regstep5Form rf) throws Exception {
    TempPhoto temp=new TempPhoto();
    Session session=null;
    Transaction tx=null;
    try{
    session = HibernateUtil.getSession();
    tx = session.beginTransaction();
    String uname=rf.getUserId();
    FormFile myFile=rf.getFileUpload();
    byte[] filedata=myFile.getFileData();
    temp.setUserId(uname);
    temp.setPhoto(filedata);
    session.saveOrUpdate(temp);
    tx.commit();
    }catch(Exception ex){ }
    finally{
    HibernateUtil.closeSession();
    return "success";
    --Here TempPhoto is the pojo class i.e hibernate generated class for the table in which we have to insert image...
    --You will understand this if u have idea of hibernate..
    --There may some import as statements missing...try it and configure your "struts-config.xml" file with the above files.
    Message was edited by:
    HaRou

    haha....that thread starter is my friend siting next to me....he is having problem with struts and jsp only, which you already solve the problem for him.. but i need to know how to do the same thing with hibernate...pls hlp?

  • Adobe PE8 Help needed...blocky images when in play mode.

    I have a Problem with blobby images and frame rates ( not sure if frame rates is the correct word!)
    I'm attempting to captured my DVD from disc onto the program, which i have done, It loads ok, however it seems to be all blobby, blocky squares on the screen, as soon as it run plays.  The audio runs fine.
    My system in case anyone wants to know is Dell Dimension DXP051  Intel(R) Pentuim(R) 4CPU 3.00 Ghz 2.99 Ghz 3.50 gb RAM, although there is 4gb in there, i have added the rest in the past 6 months !, why it only show 3.5 i don't know! 1 x 160 gb HDD, 1 x 500 HDD, both internal and a 1.5 TB external HDD, plenty of HDD space! although i'm not sure if the RAM is enough? i have quite a few software programs, however I never have more than 1-4 running at the same time, only have PE8 running on its own at the moment.
    Anyway going back to my issue, it seems to do this even if i put 3,4 images in the timeline, ( on a seperate project) is this an issue with my PC, graphics card to do with PE8, I have installed the updates by the way. Any help would be appreciated.
    I do not seem to have this issue with other picture programes.
    Thanks
    Andrew

    Andrew,
    Glad that things went well. One needs to read the instructions for each driver, and never trust that the procedure is exactly as it was only a month ago for the same card. Normally, it is and is only a simple download and execute, but I have seen times, where one had to first disable certain features in the card driver's console first. Always check carefully.
    The two main drivers to be aware of are the video and the audio, as they often get broken by OS updates. Next most likely is not really a driver, but the firmware in one's DVD burner. Those get replaced about every 6 mos. +/-. Many of the other drivers are provided by the OS, but there can be many exceptions.
    There are some utilities, that claim to get all necessary drivers on a system updated automatically. I have never seen one that worked very well. This is especially true with the video and audio drivers. What those utilities say is up to date is usually 9 mos. out of date and maybe 6-10 updates out. I would not trust such utilities, and would just do it by hand and get the drivers from the mfgr's. site, at the first sign of trouble.
    Good luck,
    Hunt

  • Help need for loading aligned images in JEditorpane

    Hi all,
    I need to align image with text using JEditorpane, If i load the html document with aligned image, there is no alignment for image in final display. So please suggest any ideas if u have on this topic. I am in great hurry.
    Thanks in advance,
    Nageswara Rao.V

    Hello,
    I'm also having the same problem, did anybody find any solution ?
    -sanjaymishra70

  • Help needed; underscore in rollover image name will not validate at WC3

    GoLive CS on an Intel PC
    UTF8 encoded, HTML 4.01 Transitional
    I have several rollovers in a page created by using the GoLive palletes, and because GoLive automatically adds an underscore to an image name in a nested folder the page cannot validate at the WC3 site. What do I need to do so that the underscore will not be added automatically? I've tried adding a name/ID to the image before creating the rollover, but it disregards the name and uses what it thinks is best, adding the underscore.
    The page is located here:
    http://www.redshift.com/~lorac/sdy-55.html
    I have attached three images that show the file names used and the results in the GoLive pallete. The first is a screenshot of the folder structure, the second is the placed image pallete and the third is the rollover pallete view.GoLive is set to strip all the GoLive code from the page before uploading, so the web version will not have any GL code.
    A sample WC3 comment is:
    Line 86, Column 226:         value of attribute "ID" invalid: "_" cannot start a name
    …pg');return true" href="#"><img id="_5502" class="img_border" src="images/jhj

    It is possible that you violated the naming convention for this attribute.       For example, id and name attributes must begin with       a letter, not a digit.
    Do I need to unnest any folders with potential rollover images? That would be a real pain... considering the amount sections and images used in the site.
    Thank you in advance for any help you can give.
    Carol

    I did as you suggested and added to the beginning of the default underscored name in the "name/ID" section and it was accepted. I changed all the rollover image names and uploaded the modified page, and was then able to validate at the WC3 validation site.
    Thank you so much! It was an easy fix... a solution I had overlooked. Oddly enough this never occurs with a remote rollover, but that is probably because GL lets you name the base image without suggesting a name first.
    Carol

  • Help need in keylistener with image

    Hi experts,
    How to add the keylistener to a scrollpane for an image update or add image to the scrollpane. The solution will not using swing. Please send an example with a source code.
    Thanks in advance.

    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import java.net.*;
    public class KeyTest4 extends Applet
        public void init()
            ImageEditorPanel editorPanel = new ImageEditorPanel();
            ScrollPane scrollPane = new ScrollPane();
            scrollPane.add(editorPanel);
            setLayout(new BorderLayout());
            add(new GridPanel(editorPanel), "North");
            add(scrollPane);
        public static void main(String[] args)
            Applet applet = new KeyTest4();
            Frame f = new Frame();
            f.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent e)
                    System.exit(0);
            f.add(applet);
            f.setSize(400,400);
            f.setLocation(200,200);
            applet.init();
            applet.start();
            f.setVisible(true);
    class ImageEditorPanel extends Panel
        ImageLoader imageLoader;
        List imageList;
        int rows, cols;
        Choice rowChoice;
        boolean showGrid;
        Color gridColor;
        int gridSize;
        int dx, dy;
        Point cursor;
        public ImageEditorPanel()
            imageLoader = new ImageLoader(this);
            imageList = new ArrayList();
            rows = 1;
            cols = 3;
            showGrid = true;
            gridColor = new Color(200,240,240);
            gridSize = 100;
            addKeyListener(new KeyNavigator(this));
            dx = dy = 10;
            cursor = new Point(10,10);
        public void paint(Graphics g)
            super.paint(g);
            int w = getWidth();
            int h = getHeight();
            if(showGrid)
                g.setColor(gridColor);
                int xInc = (w - cols * gridSize)/cols + gridSize;
                int yInc = (h - rows * gridSize)/rows + gridSize;
                int x1 = xInc, y1 = 0, x2, y2 = h;
                for(int j = 0; j < cols - 1; j++)
                    g.drawLine(x1, y1, x1, y2);
                    x1 += xInc;
                x1 = 0; y1 = yInc; x2 = w;
                for(int j = 0; j < rows - 1; j++)
                    g.drawLine(x1, y1, x2, y1);
                    y1 += yInc;
            // render images
            ImageLocator locator;
            Image image;
            Point p;
            int x, y;
            int xInc = w / cols;
            int yInc = h / rows;
            for(int j = 0; j < imageList.size(); j++)
                locator = (ImageLocator)imageList.get(j);
                image = locator.getImage();
                p = locator.getCell();
                x = p.y * xInc - xInc/2 - image.getWidth(this)/2;
                y = p.x * yInc - yInc/2 - image.getHeight(this)/2;
                g.drawImage(image, x, y, this);
            // render cursor
            g.setColor(new Color(240,200,200));
            int cx = cursor.x;
            int cy = cursor.y;
            g.fillOval(cx - 10, cy - 10, 20, 20);
            g.setColor(new Color(140,200,100));
            g.drawLine(cx, cy - 12, cx, cy - 16);
            g.drawLine(cx - 12, cy, cx - 16, cy);
            g.drawLine(cx, cy + 12, cx, cy + 16);
            g.drawLine(cx + 12, cy, cx + 16, cy);
        public Dimension getPreferredSize()
            Dimension d = new Dimension(400,400);
            ScrollPane sp = getScrollPane(this);
            Insets insets = sp.getInsets();
            int hInsets = insets.left + insets.right;
            int vInsets = insets.top + insets.bottom;
            if(sp != null)
                d = sp.getViewportSize();
            if(d.width - hInsets < cols * gridSize)
                d.width = cols * gridSize;
            if(d.height - vInsets < rows * gridSize)
                d.height = rows * gridSize;
            return d;
        public void addImage()
            Point p = getCell();
            Graphics g = getGraphics().create();
            g.setColor(Color.red);
            Image image = imageLoader.getImage();
            imageList.add(new ImageLocator(image, p));
            resetGrid();
        public void removeImage()
            Point cell = getCell();
            ImageLocator locator;
            for(int j = 0; j < imageList.size(); j++)
                locator = (ImageLocator)imageList.get(j);
                Point p = locator.getCell();
                if(cell.equals(p))
                    imageList.remove(j);
                    break;
            resetGrid();
        private Point getCell()
            Point p = new Point();
            int w = getWidth();
            int h = getHeight();
            int xInc = w / cols;
            int yInc = h / rows;
            p.x = 1 + cursor.y / yInc;  // row
            p.y = 1 + cursor.x / xInc;  // col
            return p;
        private void resetGrid()
            int oldGridSize = gridSize;
            int maxWidth = 0;
            int maxHeight = 0;
            ImageLocator locator;
            Image image;
            int w, h;
            for(int j = 0; j < imageList.size(); j++)
                locator = (ImageLocator)imageList.get(j);
                image = locator.getImage();
                w = image.getWidth(this);
                h = image.getHeight(this);
                if(w > maxWidth)
                    maxWidth = w;
                if(h > maxHeight)
                    maxHeight = h;
            if(maxWidth != gridSize || maxHeight != gridSize)
                gridSize = Math.max(maxWidth, maxHeight);
            if(maxWidth == 0 && maxHeight == 0)
                gridSize = 100;
            if(gridSize != oldGridSize)
                validateScrollPane();
            else
                repaint();
        private ScrollPane getScrollPane(Component c)
            while((c = c.getParent()) != null)
                if(c instanceof ScrollPane)
                    return (ScrollPane)c;
            return null;
        public void addRow()
            rows++;
            rowChoice.add(String.valueOf(rows));
            rowChoice.select(rowChoice.getSelectedIndex() + 1);
            validateScrollPane();
        public void setShowGrid(boolean isVisible)
            showGrid = isVisible;
            repaint();
        public void setCursor(int x, int y)
            cursor.translate(x * dx, y * dy);
            if(!isInBounds())
                scrollToView();
            repaint(cursor.x - 28, cursor.y - 28, 56, 56);
        public void centerCursor()
            ScrollPane sp = getScrollPane(this);
            if(sp == null)
                return;
            Point p = sp.getScrollPosition();
            Dimension d = sp.getViewportSize();
            cursor.x = p.x + d.width/2;
            cursor.y = p.y + d.height/2;
            repaint();
        private boolean isInBounds()
            ScrollPane sp = getScrollPane(this);
            if(sp == null)
                return true;
            Point p = sp.getScrollPosition();
            Dimension viewSize = sp.getViewportSize();
            if(cursor.x + 16 > p.x - viewSize.width ||
               cursor.x - 16 < p.x || cursor.y - 16 < p.y ||
               cursor.y + 16 > p.y - viewSize.height)
                return false;
            return true;
        private void scrollToView()
            ScrollPane sp = getScrollPane(this);
            Point p = sp.getScrollPosition();
            Dimension viewSize = sp.getViewportSize();
            int x = p.x, y = p.y;
            if(cursor.x + 16 > p.x + viewSize.width)
                x = cursor.x + 16 - viewSize.width;
            if(cursor.x - 16 < p.x)
                x = cursor.x - 16;
            if(cursor.y + 16 > p.y + viewSize.height)
                y = cursor.y + 16 - viewSize.height;
            if(cursor.y - 16 < p.y)
                y = cursor.y - 16;
            sp.setScrollPosition(x,y);
        public void setRows(int rows)
            this.rows = rows;
            validateScrollPane();
        public void setCols(int columns)
            cols = columns;
            validateScrollPane();
        private void validateScrollPane()
            ScrollPane sp = getScrollPane(this);
            if(sp == null)
                return;
            invalidate();
            repaint();
            sp.validate();
        public void setReference(Choice choice)
            rowChoice = choice;
    class GridPanel extends Panel
        ImageEditorPanel imagePanel;
        public GridPanel(ImageEditorPanel iep)
            imagePanel = iep;
            final Checkbox marker = new Checkbox("mark", true);
            marker.addItemListener(new ItemListener()
                public void itemStateChanged(ItemEvent e)
                        imagePanel.setShowGrid(marker.getState());
            final Choice
                rowChoice = new Choice(),
                colChoice = new Choice();
            rowChoice.add("1");
            for(int j = 0; j < 4; j++)
                colChoice.add(String.valueOf(j + 1));
            colChoice.select(2);
            ItemListener l = new ItemListener()
                public void itemStateChanged(ItemEvent e)
                    if(e.getStateChange() == ItemEvent.SELECTED)
                        Choice choice = (Choice)e.getSource();
                        int value = choice.getSelectedIndex() + 1;
                        if(choice == rowChoice)
                            imagePanel.setRows(value);
                        if(choice == colChoice)
                            imagePanel.setCols(value);
            rowChoice.addItemListener(l);
            colChoice.addItemListener(l);
            setLayout(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(2,2,2,2);
            gbc.weightx = 1.0;
            add(marker, gbc);
            gbc.anchor = gbc.EAST;
            add(new Label("rows"), gbc);
            gbc.anchor = gbc.WEST;
            add(rowChoice, gbc);
            gbc.anchor = gbc.EAST;
            add(new Label("cols"), gbc);
            gbc.anchor = gbc.WEST;
            add(colChoice, gbc);
            imagePanel.setReference(rowChoice);
    class ImageLocator
        Image image;
        Point cell;
        public ImageLocator(Image image, Point p)
            this.image = image;
            cell = p;
        public Image getImage()
            return image;
        public Point getCell()
            return cell;
    class ImageLoader
        Image[] images;
        int index;
        public ImageLoader(Component c)
            loadImages(c);
            index = 0;
        public Image getImage()
            return images[index++ % images.length];
        private void loadImages(Component c)
            String prefix = "images/";
            String ext = ".jpg";
            String[] fileNames = {
                "greathornedowl", "owls", "bclynx", "coyote"
            images = new Image[fileNames.length];
            MediaTracker tracker = new MediaTracker(c);
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            int id = 0;
            for(int j = 0; j < images.length; j++)
                URL url = getClass().getResource(prefix + fileNames[j] + ext);
                images[j] = toolkit.getImage(url);
                tracker.addImage(images[j], id++);
            try
                tracker.waitForAll();
            catch(InterruptedException ie)
                System.out.println("interrupted: " + ie.getMessage());
    class KeyNavigator extends KeyAdapter
        ImageEditorPanel imagePanel;
        final static int
            UP     = KeyEvent.VK_UP,
            LEFT   = KeyEvent.VK_LEFT,
            DOWN   = KeyEvent.VK_DOWN,
            RIGHT  = KeyEvent.VK_RIGHT,
            ADD    = KeyEvent.VK_A,
            REMOVE = KeyEvent.VK_R,
            CENTER = KeyEvent.VK_C,
            ENTER  = KeyEvent.VK_ENTER;
        public KeyNavigator(ImageEditorPanel iep)
            imagePanel = iep;
        public void keyPressed(KeyEvent e)
            int keyCode = e.getKeyCode();
            int x = 0, y = 0;
            switch(keyCode)
                case UP:
                    y = -1;
                    break;
                case LEFT:
                    x = -1;
                    break;
                case DOWN:
                    y = 1;
                    break;
                case RIGHT:
                    x = 1;
                    break;
                case ADD:
                    imagePanel.addImage();
                    return;
                case REMOVE:
                    imagePanel.removeImage();
                    return;
                case CENTER:
                    imagePanel.centerCursor();
                    return;
                case ENTER:
                    imagePanel.addRow();
                    return;
                default:
                    return;
            imagePanel.setCursor(x, y);
    }

  • How to enlarge an image and not lose quality of picture?

    Hi,
    I'm new to Photoshop!
    I need to enlarge an image to go on A4 paper with a landscape orientation.
    I'm struggling..any help would be great!
    Thanks,
    Kate

    You're welcome.
    What you did was known as "scaling". If there are enough pixels, you can change the print size with noticing anything wrong.
    That's the best, because you are not adding or subtracting pixels, which is called "re-sampling".
    If the scaling did not work then you would use Image Size to enlarge the picture by guessing what pixels to add. Not the best way to go, because you are adding information not in the picture to make it look better.
    My Advice: If you have a camera, use the highest MP setting, shoot jpeg best quality, or even better RAW
    If you scan, plan. 300 ppi is a good start and should give you plenty of pixels at A4.
    That really the simple story. Read up to understand digital images.
    Gene

  • Need Help With An Application That Produces Live Images Within Tilelists

    At the moment I have an application which is meant to produce live thumbnail images of websites. Currently how it does this is a html component (myhtml) loads websites via it's location property changing from website to website and upon fully loading of each site a "snapshot" is taken of the html component and saved as a bitmap and applied as the source of an image corresponding to that particular site (abcnewsimage and bbcnewsimage). However I now need to insert these snapshots within the 'icon' properties of 2 array collections (myTilelistAArrayCollection and myTilelistBArrayCollection) which act as dataproviders to populate 2 tilelists (mtTilelistA and myTilelistB).
    Basically I need the same images to appear automatically within the tilelists the way they do in the 2 images as the snapshots are taken by applying the same bitmaps into the currently empty 'icon' properties of the 2 tilelists i.e. the icon of the ABC News Item of both array collections must be the same as the abcnewsimage and appear as it appears and the same for the BBC News Item icon being the same as the bbcnewsimage picture as that appears.
    It should look like the images are appearing in the tilelist at the same time as they are appearing in the regular images. What will I need to put into the icon properties to do this?
    I hope this makes sense and if anyone can help me out it would be much appreciated. :-)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="middle" backgroundColor="white" width="1024" height="768">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.collections.*;
    private function takeSnapshot(event:Event) :void{
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myhtml) ;
    switch(myhtml.location){
    case "http://abcnews.go.com/":abcnewsimage.source =
    new Bitmap(imageBitmapData);myhtml.location =
    "http://news.bbc.co.uk/";
    break;
    case "http://news.bbc.co.uk/":bbcnewsimage.source =
    new Bitmap(imageBitmapData);
    break;}
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC New Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC News Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    ]]>
    </mx:Script>
    <mx:HBox x="10" y="10">
    <mx:Image id="abcnewsimage" width="100" height="100" scaleContent="true"/>
    <mx:Image id="bbcnewsimage" width="100" height="100" scaleContent="true"/>
    </mx:HBox>
    <mx:HTML id="myhtml" location="http://abcnews.com/" complete="takeSnapshot(event)" width="250" height="250" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="118"/>
    <mx:TileList x="268" y="118" width="294" height="250" id="myTilelistA" dataProvider="{myTilelistAArrayCollection}" rowHeight="100" columnWidth="100"/>
    <mx:TileList x="570" y="118" width="294" height="250" id="myTilelistB" dataProvider="{myTilelistBArrayCollection}" rowHeight="100" columnWidth="100"/>
    </mx:WindowedApplication>

    Cheers Flex harUI. From what I can see superimage is mainly used to keep images at better quality. What I'm concerned with is having the images set within the 'icon' properties of the 2 tilelists AS they are set within their specific images. I've tried databinding by doing this for example:-
    {id:
    "ABC New Item", label:"ABCNews", icon:"{abcnewsimage.source}"},
    I hoped that would cause the icon field of the array collection to be populated by the source of the abcnewsimage so that as the abcnewsimage is populated by the snapshot that is taken of the abcnews website the icon field of the abc news item in the array collection would be too so that furthermore the tilelists would then be populated by these images. Basically as each snapshot appears in it's specfic image it needs to be loaded into the icon property of the array collection too. In the end the icons should look as if they are appearing within both the tilelists the same way as they are appearing within the images if that makes sense. The images should be loading within the tilelist one at a time as they are in the regular image components.

  • Need Help With An Application Which Produces Live Images Within Tilelists

    At the moment I have an application which is meant to produce live thumbnail images of websites. Currently how it does this is a html component (myhtml) loads websites via it's location property changing from website to website and upon fully loading of each site a "snapshot" is taken of the html component and saved as a bitmap and applied as the source of an image corresponding to that particular site (abcnewsimage and bbcnewsimage). However I now need to insert these snapshots within the 'icon' properties of 2 array collections (myTilelistAArrayCollection and myTilelistBArrayCollection) which act as dataproviders to populate 2 tilelists (mtTilelistA and myTilelistB).
    Basically I need the same images to appear automatically within the tilelists the way they do in the 2 images as the snapshots are taken by applying the same bitmaps into the currently empty 'icon' properties of the 2 tilelists i.e. the icon of the ABC News Item of both array collections must be the same as the abcnewsimage and appear as it appears and the same for the BBC News Item icon being the same as the bbcnewsimage picture as that appears.
    It should look like the images are appearing in the tilelist at the same time as they are appearing in the regular images. What will I need to put into the icon properties to do this?
    I hope this makes sense and if anyone can help me out it would be much appreciated.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="middle" backgroundColor="white" width="1024" height="768">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.collections.*;
    private function takeSnapshot(event:Event) :void{
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myhtml) ;
    switch(myhtml.location){
    case "http://abcnews.go.com/":abcnewsimage.source =
    new Bitmap(imageBitmapData);myhtml.location =
    "http://news.bbc.co.uk/";
    break;
    case "http://news.bbc.co.uk/":bbcnewsimage.source =
    new Bitmap(imageBitmapData);
    break;}
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC New Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC News Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    ]]>
    </mx:Script>
    <mx:HBox x="10" y="10">
    <mx:Image id="abcnewsimage" width="100" height="100" scaleContent="true"/>
    <mx:Image id="bbcnewsimage" width="100" height="100" scaleContent="true"/>
    </mx:HBox>
    <mx:HTML id="myhtml" location="http://abcnews.com/" complete="takeSnapshot(event)" width="250" height="250" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="118"/>
    <mx:TileList x="268" y="118" width="294" height="250" id="myTilelistA" dataProvider="{myTilelistAArrayCollection}" rowHeight="100" columnWidth="100"/>
    <mx:TileList x="570" y="118" width="294" height="250" id="myTilelistB" dataProvider="{myTilelistBArrayCollection}" rowHeight="100" columnWidth="100"/>
    </mx:WindowedApplication>

    Cheers Flex harUI. From what I can see superimage is mainly used to keep images at better quality. What I'm concerned with is having the images set within the 'icon' properties of the 2 tilelists AS they are set within their specific images. I've tried databinding by doing this for example:-
    {id:
    "ABC New Item", label:"ABCNews", icon:"{abcnewsimage.source}"},
    I hoped that would cause the icon field of the array collection to be populated by the source of the abcnewsimage so that as the abcnewsimage is populated by the snapshot that is taken of the abcnews website the icon field of the abc news item in the array collection would be too so that furthermore the tilelists would then be populated by these images. Basically as each snapshot appears in it's specfic image it needs to be loaded into the icon property of the array collection too. In the end the icons should look as if they are appearing within both the tilelists the same way as they are appearing within the images if that makes sense. The images should be loading within the tilelist one at a time as they are in the regular image components.

  • Automatically place images within multiple InDesign documents

    I work for a publishing company of agricultural trade magazines and work on few titles each month. We are trying to streamline our production procedures and previous company I worked for had a script they used to place images within text pages by searching for the file name, however there were some limitations with this script (it would only work within 1 InDesign document and only within 1 InDesign story at a time). The company I am with now breaks out each editorial story into separate InDesign files and we place image boxes when the display ads are going to go. For our purposes now, I am looking for a script that, once all of the image boxes were tagged with the image file names, could search between multiple InDesign documents in a folder and automatically place all the images for us. Is anything like this available or able to be created? If so, would it have the capacity to search between multiple InDesign documents and search the entire document for the image file names? Any help would be greatly appreciated!

    Hi Kasyan,
    They were tagged using a program called Pathways created by a computer programmer the company used at the time. The issues that I was working on were annual Buyers' Guides so they were mainly just listings and inline graphics. The kinds of issues I work on now are monthly issue with various stories and no inline graphics, but display advertisements. And each story is created and laid out in a separate InDesign document. So I would need a script that can search an entire group of documents for file names and/or image boxes instead of just in one story in one document for inline graphics. (sorry if this is confusing).
    I currently do not have a script to work from and am looking for something new that can be used to save use the time of placing every ad manually.
    Thanks for your help and feedback!
    Matt

Maybe you are looking for

  • Error after opening a PDF

    Hi, I'm not overly familiar with creating PDF's and such so please bare with me. I have saved an Excel document as a PDF. When I open the PDF I get an error saying "An error exists on this page. Acrobat may not display the page correctly. Please cont

  • Making a basic Video starting with sound files only

    I'm totally new to Premiere and find it quite dauting. Basic tutorials don't really seem to be helping as they presume you start with a working video. What I have is several 30-60 second .wav files which I need to be in sequence most of them also hav

  • Expection

    Expection in thread"main"java.lang.ArrayIndexOutOfBoundsExpection:0 at ReverseOrder.main<ReverseOrder.java:19> How can I fix it?? import java.util.*; public class ReverseOrder {      static int counter = 0;      public static void main(String[] args)

  • Windows 8.1 - Could not find recovery environment

    Hello, So I bought a refurbished lenovo k450 which is this one http://www.microcenter.com/product/428498/k450_desktop_computer except mine has 8gb instead of 12gb, So I'm trying to factory restore my pc and It tells me "Could not find recovery enviro

  • Moving from 5.14 to FCS2

    If I get FCS2, can I import projects that I'm currently working on in 5.14 and simply carry on from where I left off?