How to stretch image

Hi
I am using the following method to resize an image, but when the new width and height do not maintain the aspect ratio of the image, the image doesn't stretch to the new size, but rather fills the background with black.
I would like to change the method to stretch the image if the new coords do not maintain the image's aspect ratio.
Also, how would I add support for saving the resized image as a GIF?
Kind regards
Peter
public static void resizeImage(String filename, int newWidth, int newHeight)
     try
          BufferedImage input = ImageIO.read(new File(filename));
          BufferedImage output = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
          double scale = (double)Math.max(newWidth,newHeight)/(double)input.getHeight(null);
          if (input.getWidth(null) > input.getHeight(null)) {
               scale = (double)Math.max(newWidth,newHeight)/(double)input.getWidth(null);
          // Set the scale.
          AffineTransform tx = new AffineTransform();
          if (scale < 1.0d)
          tx.scale(scale, scale);
          // Paint image.
          Graphics2D g2d = output.createGraphics();
          g2d.drawImage(input, tx, null);
          g2d.dispose();
          //TODO: Add support for GIF.
          ImageIO.write(output,MiscUtils.extractFileExt(filename),new File(filename));
     catch(IOException e)
          e.printStackTrace();
}

import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
import java.io.*;
import java.net.*;
import java.text.*;
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.event.*;
public class ImageScaling
    public static void main(String[] args)
        JFrame f = new JFrame("Image Scaling");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        BufferedImageComponent bic = new BufferedImageComponent();
        ImageSelector selector = new ImageSelector(bic, f);
        ImageAdjustor adjustor = new ImageAdjustor(bic);
        f.setJMenuBar(selector.getMenuBar());
        f.getContentPane().add(bic);
        f.getContentPane().add(adjustor, "South");
        f.setSize(500,350);
        f.setLocation(400,200);
        f.setVisible(true);
        System.out.println(bic.getSize());
* Image component displays scaled image.
class BufferedImageComponent extends JPanel
    URL fileURL;
    BufferedImage image;
    int width, height;
    JLabel label;
    NumberFormat nf;
    boolean centerImage;
    public BufferedImageComponent()
        width = 300;
        height = 200;
        label = new JLabel();
        nf = NumberFormat.getNumberInstance();
        nf.setGroupingUsed(false);
        nf.setMaximumFractionDigits(3);
        centerImage = false;
        setBackground(Color.white);
        setLayout(new GridBagLayout());
        add(label, new GridBagConstraints());
    private void scaleImage(int width, int height)
        BufferedImage scaledImage = new BufferedImage(width, height,
                                            BufferedImage.TYPE_INT_RGB);
        double imageWidth = image.getWidth();
        double imageHeight = image.getHeight();
        // the smaller dimension of image will fill scaledImage
        // allowing the longer dimension to overflow scaledImage
        double wScale = width/imageWidth;
        double hScale = height/imageHeight;
        double scale = Math.max(wScale, hScale);
        double y = (height - scale*imageHeight)/2;
        double x = (width - scale*imageWidth)/2;
        System.out.println("wScale = " + nf.format(wScale) + "\t" +
                           "hScale = " + nf.format(hScale) + "\n" +
                           "scale = " + nf.format(scale) + "\n" +
                           "x = " + nf.format(x) + "\ty = " + nf.format(y) + "\n" +
                           "scaledImageWidth = " + nf.format(scale*imageWidth) + "\t" +
                           "scaledImageHeight = " + nf.format(scale*imageHeight));
        AffineTransform xform = new AffineTransform();
        if(centerImage)
            xform.translate(x,y);
        xform.scale(scale, scale);
        Graphics2D g2 = scaledImage.createGraphics();
        g2.drawImage(image, xform, this);
        g2.dispose();
        label.setIcon(new ImageIcon(scaledImage));
        revalidate();       
        repaint();
    private void loadImage()
        try
            image = ImageIO.read(fileURL);
        catch(IOException ioe)
            System.out.println("IOE: " + ioe.getMessage());
    public void setImage(URL url)
        fileURL = url;
        loadImage();
        scaleImage(width, height);
    public void setCenterFlag(boolean b)
        centerImage = b;
        scaleImage(width, height);
    public void setWidth(int w)
        width = w;
        scaleImage(width, height);
    public void setHeight(int h)
        height = h;
        scaleImage(width, height);
* JSpinners to change the width and height of the image displayed
* in BufferedImageComponent and a JCheckBox that offers a centering option.
* Loaded into south section of content pane in main method.
class ImageAdjustor extends JPanel
    BufferedImageComponent bic;
    public ImageAdjustor(BufferedImageComponent c)
        bic = c;
        SpinnerNumberModel widthModel = new SpinnerNumberModel(300, 50, 400, 10);
        final JSpinner widthSpinner = new JSpinner(widthModel);
        SpinnerNumberModel heightModel = new SpinnerNumberModel(200, 50, 400, 10);
        final JSpinner heightSpinner = new JSpinner(heightModel);
        ChangeListener l = new ChangeListener()
           public void stateChanged(ChangeEvent e)
               JSpinner spinner = (JSpinner)e.getSource();
               int value = ((Integer)spinner.getValue()).intValue();
               if(spinner == widthSpinner)
                   bic.setWidth(value);
               if(spinner == heightSpinner)
                   bic.setHeight(value);
        widthSpinner.addChangeListener(l);
        heightSpinner.addChangeListener(l);
        final JCheckBox centerCheck = new JCheckBox("center");
        centerCheck.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent e)
                bic.setCenterFlag(centerCheck.isSelected());
        setLayout(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.weightx = 1.0;
        gbc.insets = new Insets(2,2,2,2);
        gbc.anchor = gbc.EAST;
        add(new JLabel("width"), gbc);
        gbc.anchor = gbc.WEST;
        add(widthSpinner, gbc);
        gbc.anchor = gbc.EAST;
        add(new JLabel("height"), gbc);
        gbc.anchor = gbc.WEST;
        add(heightSpinner, gbc);
        gbc.anchor = gbc.CENTER;
        add(centerCheck, gbc);
* JFileChooser used to load images into BufferedImageComponent.
* Accessed through file menu.
class ImageSelector
    BufferedImageComponent bic;
    JFrame frame;
    JFileChooser chooser;
    JMenuBar menuBar;
    public ImageSelector(BufferedImageComponent c, JFrame f)
       bic = c;
       frame = f;
       chooser = new JFileChooser();
       JMenu fileMenu = new JMenu("file");
       final JMenuItem openItem = new JMenuItem("open");
       ActionListener l = new ActionListener()
           public void actionPerformed(ActionEvent e)
               JMenuItem item = (JMenuItem)e.getSource();
               if(item == openItem)
                   openDialog();
        openItem.addActionListener(l);
        fileMenu.add(openItem);
        menuBar = new JMenuBar();
        menuBar.add(fileMenu);
    private void openDialog()
        int returnVal = chooser.showOpenDialog(frame);
        if(returnVal == JFileChooser.APPROVE_OPTION)
            File file = chooser.getSelectedFile();
            if(!isImage(file))
                return;
            try
                URL url = file.toURL();
                bic.setImage(url);
            catch(MalformedURLException mue)
                System.out.println("MUE: " + mue.getMessage());
     * Filters files for jpg and png extensions
    private boolean isImage(File file)
        String extension = file.getPath().toLowerCase();
        if(extension.indexOf("jpg") != -1 || extension.indexOf("png") != -1)
            return true;
        return false;
    public JMenuBar getMenuBar()
        return menuBar;
}

Similar Messages

  • How avoid stretched image on DVD from HD source clips?

    I edited a program in FCP 7.0 using HD footage from my Sony Handycam HDR-XR520. I exported to Compressor and followed the steps Shane sent in Shane's Stock Answer #42 on how to author a DVD. Thanks, Shane, I made the DVD. But the end images are all somewhat stretched out horizontally. Where did I go wrong? Where do I code this footage to come out in HD ratio but not be unnaturally stretched?
    Thanks, Duncan

    David, Thanks for your specific directions.
    1. My Sony HD camera specs say its system is 1080/60i. The FCP Browser lists the Frame Size of the imported clips as 1440 x 1080.
    2. Here I think I owe you and Shane an apology. I see that in the Browser, the Frame Size of my edited Sequence of these clips is listed as only 720 x 480. In my upgrade to FCP7 I had assumed that FCP recognized the frame size of the HD clips I was importing and would process them accordingly. But it looks like I needed to first specify the Sequence Settings. Is that true? Would it make a difference? If so, what should I set for Frame Size, Aspect Ratio, Pixel Aspect Ratio, Field Dominance? Should I check Anamorphic 16:9?
    3. FYI, despite FCP describing the ratio of the Sequence as 720 x 480, the ratio of the images still appears to be 16:9.
    4. I did as you directed and exported my edited Sequence as a QT Movie Self-Contained and looked at it. It was NOT distorted -- it looked just right. Cmnd-I shows the ratio to be 720 x 480, but it displays the 16:9 ratio images in a letterbox fashion.
    5. If the settings in FCP need to be changed, can I do that globally or do I need to reedit the program?
    6. If I simply took the Self Contained QT movie into Compressor and DVD SP, would the quality be as good as if I started with the right settings?
    With lots of thanks, Duncan

  • I would like to know how to stretch a background image using HTML

    Hello Seniors of Sun,
    I gota small doubt in HTML, can any one please help me in solving it,
    I would like to know how to stretch a background image using HTML? I have tried and tried to figure this out and cannot..
    so any one kindly help me in this...
    waiting for reply...

    Please note that this is not an HTML forum.
    You can use an image tag on a DIV positioned behind the rest of the page, so that could actually work. And if you want to use body:background, then look up an HTML/CSS reference and see if there are any other body attributes or CSS stuff that applies to the background image.

  • Image placeholder - how not to stretch images by default

    Captivate 8.0.1.242 - Windows 7
    How do I make the image placeholder to not to stretch images by default and rather when I add the image using the + symbol, it should maintain the aspect ratio of the image and resize only based on either width or height?
    Or still maintain aspect ratio of the image but crop of the excess beyond the current placeholder size.
    I want this by default as when I create my courses, my images vary in aspect ratios and sizes quite a bit. Thus investing time on each image through "edit image" in the properties isn't efficient.

    Do you have any suggestions for what I can do instead? I just don't want to spend couple of minutes for each picture which obviously gets multiplied for each of the 3 different responsive views. This is lead to hours wasted for each course work. Am I forced to find only pictures of same aspect ratio and size for the future or is there any workaround?

  • How to load images from css file in JavaFX 8

    I have this css file which loads images in JavaFX 8 application:
    #pill-left {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
    #pill-left .label {
        -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-left:selected .label {
        /* -fx-text-fill: black; */
        -fx-text-fill: white;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-center {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
    #pill-center .label {
        -fx-text-fill: #d3d3d3;
         -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-center:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-right {
        -fx-padding: 5;
        -fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
         -fx-border-image-repeat: stretch;
        -fx-background-color: null !important;
    #pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
    #pill-right .label {
         -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-right:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    The images are located at the Java package com.dx57dc.images
    In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
    ava.lang.NullPointerException
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
    at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
    at java.lang.Thread.run(Thread.java:724)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    What is the proper way to load images from css in Java 8?
    Ref
    How to load images from css file in JavaFX 8 - Stack Overflow

    There is nothing special to do - you execute the statement from your program just like any other SQL statement.  The only thing to be aware of are the privilege/permission issues:
    When loading from a file on a client computer:
    READ CLIENT FILE privilege is also required for the database user.
    Read privileges are required on the directory being read from.
    The allow_read_client_file database option must be enabled.
    The read_client_file secure feature must be enabled.
    Revoking these privileges is also the only way you can prevent a user from executing the statement.

  • How to make image resizable using mouse ?

    Hi,
    I want to know about that how to resize image by using mouse in Java Canvas. I created some tools like line, free hand, eraser. And want to know how to make an image resizable in canvas by using mouse. An image is jpeg, png, or gif format. I want to make image stretch and shrink by using mouse.
    Please help me..
    Thnax in advance.
    Manveer

    You make a listener to handle the mouse event that you want to capture, then program the affect you want using the event as the trigger.

  • Stretch image

    Do you know how to stretch an image according to the size of the screen?

    What exactly do you mean? Do you mean the screen area(how many pixels wide and tall the screen is) or the component you're drawing onto?
    The Graphics class has several methods that you can use to draw an image in different sizes. They are all drawImage, and take increasing numbers of properties. The first one simply takes an image, an x, a y, and draws the image at its stored size. The one with the most number of parameters draws a specific region of the image to a certain spot at any size.
    The GraphicsDevice, GraphicsEnvironment, and GraphicsConfiguration classes could all be useful for determining the screen size. Unfortunately I don't have much experience in this area, so I'm not sure exactly what you should do.
    Ha, ha, you can't say ass

  • How to change image position in PanelStrecthLayout  using css?

    Hi All,
    I am using JDeveloper 11.1.1.6.
    My Scenario is I need to show the image front of the Panel Stretch Layout .I tried to set like Style Class and change the Z-index but it's not working ,
    My Design Like :
    <af:panelStretchLayout id="psl3" inlineStyle="background-color:red" styleClass="ImageStyle">
                          <f:facet name="center">
                            <af:panelStretchLayout id="psl2" topHeight="40px"
                                                   inlineStyle="margin:20px;">
                              <f:facet name="center">
                                <af:panelGroupLayout id="pgl3" layout="vertical"
                                                     inlineStyle="background-color: Green">
                                  <af:panelGroupLayout layout="vertical" id="pgl4"   inlineStyle="margin-top:10px;margin-left:10px;background-color:Green">          
                                  </af:panelGroupLayout>
                                </af:panelGroupLayout>
                              </f:facet>
                            </af:panelStretchLayout>
                          </f:facet>
                        </af:panelStretchLayout>
    My CSS Codes :
    .ImageStyle{
    background-image: url("../img/sampleimage150x100.png");
    z-index:9999;
    background-repeat: no-repeat;
    How to show image in-front of the layout not it's hiding behind the layout ...
    Thanks..

    Hi,
    normally you would use skinning to skin the components. I don't think that layers make a different because with the stretch layout there are no overlapping layers. So maybe we should start with the use case you are trying to implement, I am not sure I understand the sentence: "I need to show the image front of the Panel Stretch Layout". What does this mean "in front" ? Do you want it to hide the panel stretch layout ? What is the use case?
    Frank

  • How to Call Image Viewer from Form application

    Hi,
    how to call Image viewer using host command on oracle form 6i.
    i trying using host command on local/client application .. and it is working ...
    but when i try on server application (EBS - UNIX) it does not working ...
    thanks ..
    regards,
    safar

    Are you using Forms 6i in client/server mode or web deployed? I'm not sure what you mean by 'try on server application"
    Remember that when using a web deployed architecture, a host command will execute the command on the Forms application server, NOT on the client.
    To execute host commands on the client you would have to use WebUtil, but that's not available for Forms 6i. Perhaps there are PJC's out there that can do it for you, but I don't want to get in all those details without me knowing if it is relevant for you.

  • How to use images from ADFLib

    Hello OTN,
    My application is devided into several ADFLibs, one of them is CommonUI. It includes common skin and it is imported into every application part.
    There are some images which should be available in different parts, so I decided to put them in CommonUI.
    After deploying adflibCommonUI adn refreshing Resource Palette, somehow I expected to see this image there, but it isn't.
    Could someone, please, explain me, how to use images contained in imported ADFLib, for example, as imageLink icon?
    Thanks.
    ADF 11.1.2.1

    Hi,
    images need to be saved in a specific file structure in the JAR file to be accessible. See:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/86-images-from-jar-427953.pdf
    Frank

  • How do you  "image correction" in PREVIEW in a macbook pro? I have an iBook G4 that gives it as an option in the tools drop down window.

    how do you  "image correction" in PREVIEW in a macbook pro? I have an iBook G4 that gives it as an option in the tools drop down window.

    From preview:
    Tools-> Adjust Color-> Auto Levels
    Or you can import the image into iPhoto:
    Edit-> Enhance

  • How to store image in the oracle database 10.2.

    Hi.,
    I am working on 10g ids. I have designed a form where there are two fields. Name and picture.
    I want to keep details of the person with their photo.
    I can simply put name but how to insert image in the picture field??
    can you suggest ??
    Thanks.
    Shyam

    Hi
    To store your binary images in an Oracle database, you will need to create a column in your table defined with the BLOB datatype BLOB stands for Binary Large Object. Images from scanners, mpeg files, movie files and so on can all be stored in the BLOB column
    sq>CREATE TABLE test_table (
       id NUMBER,
       image BLOB);then go to
    [http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10796/toc.htm]

  • How to copy images from another MC in reversed order??

    Hi everyone,
    I'm new to AS3 and have been fighting and searching for a solution to this problem for a week now, and I'm VERY close!
    I crated a MC holding of a series of images (about 50) and I jump around in it using plenty AS3 scripts (most of which I don't fully understand yet, but I'm working on that to! )
    I had to find a way to "rewind" (= play backwards) the MC. Since there is a stop(); command in almost every frame, prevFrame does not work and if I put that in a loop, it goes WAY to fast (but worked).. So I could think of only one way...
    Create a new (reverserd) MC with the same image sequence ald reverse it manually and play that one.
    This all works fine (very proud of it ).
    Now my question:
    To get this to work for multiple image sequences, I have to load all images twice (once in MC_1 and again in MC_2 and select them and reverse them).
    Not a big one, unless you want to create MANY of those SWF's...
    Is it possible to load the 50 images of the first MC in reverse into the second MC dynamically? JUST the images, noting else.
    extra info: the MC_2 is already in the lib(empty) and placed on the stage.
    something like:
    var pointer:Number=1;
    for (var:i:Number=50;i>=0;i--) {
    get MC_1.picure(var);
    put it in MC_2.frame(pointer);
    pointer = pointer + 1;
    All help is welcome and please take into account that I have little experience and copy most of my scripting from people like you
    T.I.A.
    Melluw

    I tried your advice (thanks for that)
    The event I already have is the mouse leave
    I //-d out the part I removed (what did work)
    The code I ended up with is:
    function Start() {
    stage.addEventListener(Event.MOUSE_LEAVE, cursorHide);
    function cursorHide(evt:Event):void {
    var currFrame = MC_1.currentFrame;
    if (CCW == true) {  //it is true in this case
      movStart = (50 - currFrame);
    else {
      movStart = currFrame;
    if (movStart>25) {
      MC_1.prevFrame();
    // removed swapChildren(MC_1, MC_2); // This is the part I removed
    // removed MC_2.gotoAndPlay(movStart);
    else {
      MC_1.gotoAndPlay (movStart);
    And if I leave the stage on the part where movStart is indeed >25
    Nothing happens,
    So I guess this is not what you meant
    Subject: Action Script 3 how to copy images from another MC in reversed order??
    I cannot direct you in the loading of the images approach, it will be too complicated, and will probably not work anyways... when you move away from a frame that has dynamic content, you lose the content.  So basically, there is nothing practical in taking that approach.
    I do niot understand what the problem will be with the enterFrame/prevFrame approach. If everything you can do with the mouse is already used (which I doubt) by the first mc, then there is nothing else you can do with this file.  You probably just need to rethink your control scheme.  You should search Google for "AS3 slideshow tutorial", and to lighten up your design, add "XML" in that search.
    >

  • How to insert image in forms?

    Hi Friends,
    I m new to Forms. plz tell me how to display image in canvas (form)?
    I m using Forms 6i.

    do you want to show a static image or an image from the database?
    If its a static image have at look at this Re: Oracle FORMS with image background, is that possible?
    If its a database image you should have a table with a blob-column. If you use the databalock wizard and include that column in the block, it will generate you an image-item which can then be shown in the layout.
    Edited by: Andreas Weiden on 25.11.2008 21:58

  • Hello, i am new to the mac and i need to learn how to re image using an external hard drive

    Hello, i am new, like baby fresh new,...lol, to the mac and i need to learn how to re-image using an external hard drive.

    How to replace or upgrade a drive in a laptop
    Step One: Repair the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger, Leopard or Snow Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Step Two: Remove the old drive and install the new drive.  Place the old drive in an external USB enclosure.  You can buy one at OWC who is also a good vendor for drives.
    Step Three: Boot from the external drive.  Restart the computer and after the chime press and hold down the OPTION key until the boot manager appears.  Select the icon for the external drive then click on the downward pointing arrow button.
    Step Four: New Hard Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your new hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID  then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Step Five: Clone the old drive to the new drive
    1. Open Disk Utility from the Utilities folder.
    2. Select the destination volume from the left side list.
    3. Click on the Restore tab in the DU main window.
    4. Check the box labeled Erase destination.
    5. Select the destination volume from the left side list and drag it to the Destination entry field.
    6. Select the source volume from the left side list and drag it to the Source entry field.
    7. Double-check you got it right, then click on the Restore button.
    Destination means the new internal drive. Source means the old external drive.
    Step Six: Open the Startup Disk preferences and select the new internal volume.  Click on the Restart button.  You should boot from the new drive.  Eject the external drive and disconnect it from the computer.

Maybe you are looking for

  • Airport password doesn't work, how do I change it?

    I locked my airport after using it for ages in an unlocked format.  Now I am not able to get into it for the purpose of reconfirguring it.  The password I used to secure the lock doesn't work.  Is there any way to change a password when you don't kno

  • HP Officejet - Crooked Scans and PreSet Margins

    Scanning:  Pages feed through automatic ADF unevenly, causing all the scans to be crooked.  I want to be able to scan stacks of documents at a time and do not want to have to straighten every scan.  The problem appears to be with the roller that pull

  • How to serve a user text in a diffrent encoding

    Hi , i have a problem i can't figure out how to solve , i have a site that is UTF-8 based but deals with clients that have different encoding on their site . part of the functionality of my site is in some cases to generate a string that will eventua

  • Can't import/play songs after rebuilding machine

    i can't import or play half of the music i purchased from itunes after wiping my machine and installing windows 7. my default music folder is on an external hard drive so i didn't think i had to worry about losing anything since i didn't change anyth

  • Scan gives me a file with o bytes?

    For some reason, when I scan an image to my computer, I get a preview image after the scan that looks fine, I right click to send it to my computer, but when I go to open the file, it has 0 bytes and I can't of course open it. I tried installing the