Properly Loading a Image

Hi,
I am working on a GameEngine program and one of the things I need it to do is to make sure that it properly loads the image before it tries to use it.
To do this I have in the constructor for my GameImage object a call to a function which has this code:
boolean isLoaded = false;
while(!isLoaded)
    if(Toolkit.getDefaultToolkit().prepareImage(i,-1,-1,this)) //i is the image in the parameters
     isLoaded = true;So, what this code does is while it is not loaded it does calls prepareImage which returns true if it is loaded and false if it is not. If it is it sets isLoaded = true to stop the while, then the function just ends.
Is this the best way or is there a more efficent, faster way of doing this?
(I just kind of made how to do this function up myself)

How I have it set up now, when the object is created
it creates an instance of MediaTracker, adds it, and
waits for it.
Would it make a significant difference if I was to
create one instance of MediaTracker, add them all to
that one, then load them all at once?Okay, I answered my own question, and the answer is yes.
My load time for my images went from an average of about 25 seconds down to 1.5 seconds (This was loading 3 images, then setting 1 to a scaled instance of one of the first 3 loaded. The total size is about probably about 100KB). That is a significant difference, although, I am going to see if I can stream line it even more.

Similar Messages

  • Cinnamon background changer will not load background images

    Hello,
    Since about yesterday (when I did a pacman -Syu), the cinnamon background changer refuses to load any images to change the background to. When I run cinnamon-settings from a terminal and select backgrounds, the following occurs:
    Loading Backgrounds module
    Failed to convert /usr/share/backgrounds/gnome/Blinds.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Bokeh_Tails.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Chmiri.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Dark_Ivy.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Fabric.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Flowerbed.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/FootFall.png: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Locked.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Mirror.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Road.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Sandstone.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Stones.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Terraform-green.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Waves.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/backgrounds/gnome/Whispy_Tails.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /usr/share/themes/Adwaita/backgrounds/morning.jpg: 'NoneType' object has no attribute 'mode'
    Failed to convert /home/evan/.cinnamon/backgrounds/hd-wallpapers.jpg: 'NoneType' object has no attribute 'mode'
    So I'm assuming it's somehow not properly loading the images. I can't add any images manually either, since once I do it gives this error for that image as well.
    I can provide a list of the packages updated. Cinnamon was not one of them and downgrading Cinnamon did not help.
    Thanks in advance!
    Last edited by Ekkoria (2014-07-05 18:59:30)

    Possibly a change in python2-pillow
    Possible fix in /usr/lib/cinnamon-settings/bin/imtools.py line 862
    Change from
    if source == mask:
    to
    if mask and source == mask:

  • Loading custom image formats

    Hello all.
    I am wanting to load a custom image format into my Java application, and am wondering how to do that. I have a few ideas to try but I figure if there is a site out there (or someone with the knowledge), there is no need for me to re-invent the wheel. So hopefully, someone might be able to expedite my learning. :)
    The image format I want to read actually contains multiple images, with 1 color palette at the end of the file. I'd like to create a series of (I assume) BufferedImages for all the images contained within the file.
    Are there any sites out there that can send me through a quick tutorial on rolling my own images, or can anyone give me a short function to do so?
    Thanks so much!

    Okay... I failed. I could really use some help in getting this work. Please.
    I have a file, which contains 1 or more compressed bitmap images and a palette. I have a small Perl script that will convert the images in the file into multiple bitmap image files, so I know where the data is and I know I have the data locations right. :)
    To create a BITMAP, I must reverse the order of the palette (perl function):
    sub reversePalette() {
      my $output = "";
      for (my $i=0; $i < length($_[0]); $i=$i+4) {
        $output = $output . substr($_[0], $i+2, 1) . substr($_[0], $i+1, 1) . substr($_[0], $i+0, 1) . chr(0);
      return $output;
    }For the image data itself, it uses a simple RLE encoding. If I see a 0, I check the next number and "uncompress" the data by adding that many 0's to the output file.
    So, what I would like to do is convert my Perl script into a Java class that will take this sprite file and return an array of BufferedImages, which can then be used for whatever.
    Any help in this would be greatly appreciated! I can't even figure out how to properly load a valid BMP file manually using WritableRaster and ColorModel. I'm so lost. :(

  • Slow loading of images

    When I go to a web page with lots of images (basically, all of them) Safari loads the text portion of the page promptly, then hangs up and waits and after an excruciatingly long time will give up and load question marks for all the images. If I reload the page the images immediately load properly. Sometimes I'll stop the loading process while it's hung up, and reload the page, and again all images appear fairly promptly. Anyone else having this problem? It helps to empty the cache and clear the history, but I can't do that every time I load an image heavy page. Any ideas?
    iMac   Mac OS X (10.3.4)  

    Hi Elaine,
    Welcome to Apple Discussions
    Two areas to check:
    Safari Preferences>Appearance panel. Make sure the "image load" selection is checked. If not, do so, then try a page load again.
    Otherwise, go to your System Preferences>Network>TCP panel. There, enter 4.2.2.1 and 4.2.2.2 (separate lines) in the DNS servers box. Then select "apply".
    Restart Safari and try the page load again.
    I notice your tag says 10.3.4. Is this correct? Latest version of OS X Panther is 10.3.9, which would give you an upgraded version of Safari (v 1.3.2). You can upgrade via Software Update in System Preferences. If you do this, do not use the computer during the upgrade process. After finished, make sure you "repair permissions" using Disk Utility>First Aid Panel ini your Utilities folder.
    Post back
    Message was edited by: Hawaiian_Starman

  • Loading an image in an applet

    I am trying to load and display an existing image to my applet and break the image up into segments to allow the pieces to be moved into their correct position. However it is only getting as far as cutting the image up but it does not complete loading the image. Below is the run() method im using to load it:
    public void run()
            int i;
            MediaTracker trackset;              // Tracker for images
            Image WholeImage;                 // The whole image
                        Image ResizedImage;
            ImageFilter filter;
         // Determine the size of the applet
         r = getSize();
            // Load up the image
            if (getParameter("SRC") == null)
              Error("Image filename not defined.");
         WholeImage = getImage(getDocumentBase(), getParameter("SRC"));
         // Scale original image if needed
            // Make the image load completely and put the image
            // into the track set.  Where it waits in paint() method.
            trackset = new MediaTracker(this);
            trackset.addImage(WholeImage, 1);
            // Mix up the puzzle
            System.out.println("Mixing puzzle.");
            PaintScreen = 2;
            repaint();
            try {
            Thread.sleep(100);
         } catch (InterruptedException e) {
            // Tell user of the wait for image loading
           //Trap trackset exceptions that track if the image
           //hasn't loaded properly and output to the user.
            PaintScreen = 0;
            repaint();
            try {
            Thread.sleep(100);
         } catch (InterruptedException e) {
            try {
               trackset.waitForID(1);
            } catch (InterruptedException e) {
               Error("Loading Interrupted!");
            // Check if image loaded up correctly
            //Where is image is held in the same directory
            //as the HTML file use getImage method to pass
            //getDocumentBase(), taking in the getParameter.
            if (WholeImage.getWidth(this) == -1)
                 PaintScreen = 3;
                 repaint();
                 WholeImage = getImage(getDocumentBase(), getParameter("SRC"));
                 trackset = new MediaTracker(this);
                 trackset.addImage(WholeImage, 1);
                 try {
                    trackset.waitForID(1);
                 } catch (InterruptedException e) {
                    Error("Loading Interrupted!");
                 if (WholeImage.getWidth(this) == -1)
                      PaintScreen = 4;
                      repaint();
                      stop();
                      return;
         // Resize picture if needed.
         int ResizeOption = integerFromString(getParameter("RESIZE"));
         if ((r.width != WholeImage.getWidth(this) ||
              r.height != WholeImage.getHeight(this)) &&
                ResizeOption != 0)
              if (ResizeOption == 2)
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_FAST);
              else if (ResizeOption == 3)
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_SMOOTH);
              else if (ResizeOption == 4)
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_AREA_AVERAGING);
              else
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_DEFAULT);
              trackset.addImage(ResizedImage, 2);
              PaintScreen = 5;
              repaint();
              try {
              Thread.sleep(100);
              } catch (InterruptedException e) {
              try {
              trackset.waitForID(2);
              } catch (InterruptedException e) {
              Error("Loading Interrupted!");
              WholeImage = ResizedImage;
            // Complete loading image.  Start background loading other things
            // Also put image into the Graphics class
            // Split up main image into smaller images
            PaintScreen = 1;
            repaint();
            try {
               Thread.sleep(100);
            } catch (InterruptedException e){}
            piecewidth = WholeImage.getWidth(this) / piecesx;
            pieceheight = WholeImage.getHeight(this) / piecesy;
            System.out.println("Image has loaded.  X=" +
                               WholeImage.getWidth(this) + " Y=" +
                               WholeImage.getHeight(this));
            imageset = new Image[totalpieces];
            for (i = 0; i < totalpieces; i++)
                 filter = new CropImageFilter(GetPieceX(i) * piecewidth,
                                              GetPieceY(i) * pieceheight,
                                              piecewidth, pieceheight);
                 imageset[i] = createImage(new
                                           FilteredImageSource(WholeImage.getSource(),
                                                               filter));
            // Set up the mouse listener
            System.out.println("Adding mouse listener.");
            addMouseListener(this);
            // Complete mixing the image parts
            System.out.println("Displaying puzzle.");
            PaintScreen = -1;
            repaint();
            while (end != null)
              try {
                 Thread.sleep(100);
              } catch (InterruptedException e){}
         }Any help to where im going wrong would be much appreciated. Thanks!

    ive seen this one many times and it dosent work for me! Shouldnt the second parameter of the getImage(...) method not include the 'http://..." part as that what getDocumentBase() is for, returning the URL of the page the applet is embedded in? I have tried using code like this and event getting a printout of the doc/code base into the console to make sure my images are in the right place (.gif images), and nothing's happening, null pointer every time!
    {code}
    Image image;
    public void init() {
    // Load image
    image = getImage(getDocumentBase(), "http://hostname/image.gif");
    public void paint(Graphics g) {
    // Draw image
    g.drawImage(image, 0, 0, this);
    {code}
    ps this code is from the site mentioned above
    Edited by: Sir_Dori on Dec 8, 2008 8:37 AM

  • Why Mail can´t load html images when it should?

    Hi, This is odd: Mail 6.2 seems unable to load html images on e-mail received even if the preference is set properly. Any clue?

    not at all. It happens since I´ve upgraded to Mountain Lion a few days back

  • Loading realscale image from memorycard.

    Hi.
    I made a big image (3550 x 2100 pixels), which my Nokia 6125 didn't zoom enough on the normal Picture preview.
    So I decided to make a program for it, so I could see all the details from the pic, and move around on the image. (Like zoom, but I need to get closer.. )
    First problem i encountered, was that 4mb application was too big to install on my memorycard... Darn limits...
    So I decided to add them seperately, that I'd load the image from the application.
    Well when I ran the "File Browser", there was 3 things:
    - ".." (Folder up)
    - "E:\" (crashes, no access)
    - "C:\" (crashes, no access)
    So any ideas how could I get it work properly?
    Thanks!

    hmm ... ok .. that sounds good .. but that means that
    a servlet must exsist at all time to display the
    required image.Servlets are usually instantiated by the servlet container upon an incoming request.

  • I cannot seem to load raw images into LR 2.5.  I've been using this for years.  I always load from memory card, but it gives me an unknown error message.  I tried to load from camera, hard drive, & external drive and still will not work.  I checked import

    I cannot seem to load raw images into LR 2.5.  I've been using this for years.  I always load from memory card, but it gives me an unknown error message.  I tried to load from camera, hard drive, & external drive and still will not work.  I checked import menu and nothing has changed.  I loaded the photos onto my tablet and images are fine, so do not feel it is the memory card.  Any thoughts?

    The error message probably said "unsupported or damaged"
    The T3 requires Lightroom 3.4.1 or later. You can either upgrade to a more current version of Lightroom (version 5.6 is the most recent) or you can use the free Adobe DNG Converter to convert the RAWs to DNG, which should import into Lightroom properly.

  • Loading an Image from a local File (AIR/Flex)

    var f:File = (assume it's a valid image file reference)
    var i:Image = new Image();
    i.source = f.nativePath;
    Kinda makes sense right? Except it doesn't display properly when the image is added unless I also specify a width and height on the new Image. This may not be a problem in many applications that hard code the size anyway, but I want to use the actual size of the image, without rescaling.
    i.width = whatever;
    i.height = whatever;//But I don't want to hard code these values, I want "actual" image size!
    Anyone know of a way to get around this problem? Am I missing a step here? Web resources on this specific topic are very lacking.

    I would think that this crummy custom Image class hack would work, but surprise surprise -- the width/height in loaderInfo is flat out WRONG when the event fires. It seems to have a hard coded width/height no matter what the file size. Silly!
    <mx:Image xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init()">
         <mx:Script>
              <![CDATA[
                   public function init():void {
                        this.addEventListener(Event.COMPLETE, loaded);
                   private function loaded(e:Event):void {
                        this.width = this.loaderInfo.width;
                        this.height = this.loaderInfo.height;
              ]]>
         </mx:Script>
    </mx:Image>
    Turns out, this version DOES work (but it's still a hack fix in my opinion):
    <mx:Image xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init()">
         <mx:Script>
              <![CDATA[
                   public function init():void {
                        this.addEventListener(Event.COMPLETE, loaded);
                   private function loaded(e:Event):void {
                        this.width = this.contentWidth;
                        this.height = this.contentHeight;
              ]]>
         </mx:Script>
    </mx:Image>
    You guys at Adobe are so silly.    It would seem to me that Image's width and height should be set (rather than left at 0) once the content's width and height is known.  So now that I've fixed this bug (as far as I'm concerned) for ya Adobe, I take cash, cashier's check, or money orders--thanks!
    But really, if this doesn't work this way in Flex 4, I think it should.

  • Loading an image from a stream

    Hello,
    I am trying to load several images into the database from a
    ZipInputStream.
    When I use the the loadDataFromInputStream method the first
    image loads properly. But when I try to extract the next zipped
    file from the stream I get an error saying the stream has been
    closed.
    Has anyone else had this problem? No of any fixes?
    I am going to write the zipped images out the filesystem and
    then reload them but that seems like a big waste of time and
    resources.
    Help please,
    Abel Rauch

    The current implementation of loadDataFromInputStream() closes
    the InputStream after the content gets loaded.
    You may have to write a CustomInputStream class which extends
    from the ZipInputStream. Then override the close() method to do
    nothing or call getNextEntry(). You should be able to use this
    CustomInputStream in loadDataFromInputStream().
    richard

  • Safari does not load large images

    Images like on http://imgur.com/a/ZKhFa#zV5Hq9q do not load properly.
    The load halfway, and when they become a certain size, they do not load anymore.
    I have noticed this since OS X Mavericks.
    Firefox and Chrome load these images properly.

    Might be a Safari extension or third party plug-in preventing the images from loading properly.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test. If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.
    If it's not an extensions issue, try troubleshooting third party plug-ins.
    Back to Safari > Preferences. This time select the Security tab. Deselect:  Allow plug-ins. Quit and relaunch Safari to test.
    If that made a difference, instructions for troubleshooting plugins here.

  • How to load mutiple image

    I'm trying to create a photo manager but I can't find a way to load multiple images onto my frame. I have a thumbnail class that makes thumbnails for an image (which is a modified version of the class ImageHolder from FilthyRichClient)
    public class Thumbnails {
         private List<BufferedImage> scaledImages = new ArrayList<BufferedImage>();
    private static final int AVG_SIZE = 160;
    * Given any image, this constructor creates and stores down-scaled
    * versions of this image down to some MIN_SIZE
    public Thumbnails(File imageFile) throws IOException{
              // TODO Auto-generated constructor stub
         BufferedImage originalImage = ImageIO.read(imageFile);
    int imageW = originalImage.getWidth();
    int imageH = originalImage.getHeight();
    boolean firstScale = true;
    scaledImages.add(originalImage);
    while (imageW >= AVG_SIZE && imageH >= AVG_SIZE) {
         if(firstScale && (imageW > 320 || imageH > 320)) {
              float factor = (float) imageW / imageH;
              if(factor > 0) {
              imageW = 320;
              imageH = (int) (factor * imageW);
              else {
                   imageH = 320;
                   imageW = (int) (factor * imageH);
         else {
              imageW >>= 1;
         imageH >>= 1;
    BufferedImage scaledImage = new BufferedImage(imageW, imageH,
    originalImage.getType());
    Graphics2D g2d = scaledImage.createGraphics();
    g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2d.drawImage(originalImage, 0, 0, imageW, imageH, null);
    g2d.dispose();
    scaledImages.add(scaledImage);
    * This method returns an image with the specified width. It finds
    * the pre-scaled size with the closest/larger width and scales
    * down from it, to provide a fast and high-quality scaled version
    * at the requested size.
    BufferedImage getImage(int width) {
    for (BufferedImage scaledImage : scaledImages) {
    int scaledW = scaledImage.getWidth();
    // This is the one to scale from if:
    // - the requested size is larger than this size
    // - the requested size is between this size and
    // the next size down
    // - this is the smallest (last) size
    if (scaledW < width || ((scaledW >> 1) < width) ||
    (scaledW >> 1) < (AVG_SIZE >> 1)) {
    if (scaledW != width) {
    // Create new version scaled to this width
    // Set the width at this width, scale the
    // height proportional to the image width
    float scaleFactor = (float)width / scaledW;
    int scaledH = (int)(scaledImage.getHeight() *
    scaleFactor + .5f);
    BufferedImage image = new BufferedImage(width,
    scaledH, scaledImage.getType());
    Graphics2D g2d = image.createGraphics();
    g2d.setRenderingHint(
    RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2d.drawImage(scaledImage, 0, 0,
    width, scaledH, null);
    g2d.dispose();
    scaledImage = image;
    return scaledImage;
    // shouldn't get here
    return null;
    A loop will loop through a collection of files and pass them to the constructor of Thumbnails to create thumbnails and then set them as icon for JLabels that will be added to a JPanel, but it throws a java.lang.OutOfMemoryError at this line:
    BufferedImage originalImage = ImageIO.read(imageFile);
    even when there're only about 8 image files in the collection (total size 2,51MB).
    I've seen other people's software that could load hundreds of photos in a matter of seconds! How do I suppose to do that? How to load mutiple images efficiently? Please help!! Thanks a lot!

    another_beginner wrote:
    Thanks everybody! I appreciate your help! I don't understand why but when I use a separate thread to do the job, that problem disappear. You were likely doing your image loading and thumnail creation on the Event Dispatching Thread. Among other things, this is the same thread that updates and paints your panels, frames, buttons, ect.. When a programer does something computationaly expensive on the event dispatching thread then the GUI becomes unresponsive until the computation is done.
    Ideally what you want to do is load images and create thumnails on a seperate thread and update your GUI on the event dispatching thread. I supect that while you are finally doing the first item, you might now be violating the second item.
    Whatever, the program seems to be pretty slow on start up 'cause it have to reload images everytime. I'm using Picasa and it can display those thumbnails almost instantly. I know that program is made by professionals. But I still want to know how.I took a look at this Picasa you mentioned. It's the photo manager from google right? You're right in that the thumnails display instantly when starting up. This is because Picasa is actually saving the thumnails, instead of creating them everytime the program starts up. It only creates the thumnails once (when you import a picture) and saves the thumnail data to " +*currentUser*+ /AppData/Local/Google/Picasa2/db3/" (at least on my computer --> Vista).
    Also, if your looking for speed then for some inexplicable reason java.awt.Toolkit.getDefaultToolkit().createImage(...); is faster (sometimes much faster) than ImageIO.read(...). But there comes a price in dealing with Toolkit images. A toolkit image isn't ready for anything until it has been properly 'loaded' using one of several methods. Also, when you're done and ready for the image to be garbage collected then you need to call Image.flush() or you will eventually find yourself with an out of memory error (BufferedImages don't have this problem). Lastly, Toolkit.createImage(...) can only read image files that the older versions of java supported (jpg, png, gif, bmp) .
    And, another question (or maybe I should post it in a different thread?), I can't display all thumbnails using a JPanel because it has a constant height unless I explicitly set it with setPreferredSize. Even when put in a JScrollPane, the height doesn't change so the scrollbar doesn't appear. Anyone know how to auto grow or shrink a JPanel vertically? Or I have to calculate the preferred height by myself?Are you drawing the thumnails directly on the JPanel? If so then you will indeed need to dynamically set the preferred size of the component.
    If not, then presumebly your wrapping the thumnails in something like a JLabel or JButton and adding that to the panel. If so, what is the layout manager you're using for the panel?

  • Error While loading a image from database

    Purpose
    Error While loading the Image from the database
    ORA-06502: PL/SQL : numeric or value error:Character string buffer too small
    ORA-06512: at "Sys.HTP" ,line 1480
    Requirement:
    I am developing the web pages using PSP(Pl/sql Serverpages) . I have a requirement to show a image in the webpage. I got the following procedures from the oracle website.
    I have created the following table to store the images
    create table DEMO
    ID INTEGER not null,
    THEBLOB BLOB
    And I also uploaded the Images. Now I am try to get a image from the table using the following procedure .But I am getting the error message line 25( htp.prn( utl_raw.cast_to_varchar2( l_raw ) );) .at it throws the following error messages
    ORA-06502: PL/SQL : numeric or value error:Character string buffer too small
    ORA-06512: at "Sys.HTP" ,line 1480
    Procedure that I used to get the image
    create or replace package body image_get
    as
    procedure gif( p_id in demo.id%type )
    is
    l_lob blob;
    l_amt number default 30;
    l_off number default 1;
    l_raw raw(4096);
    begin
    select theBlob into l_lob
    from demo
    where id = p_id;
    -- make sure to change this for your type!
    owa_util.mime_header( 'image/gif' );
    begin
    loop
    dbms_lob.read( l_lob, l_amt, l_off, l_raw );
    -- it is vital to use htp.PRN to avoid
    -- spurious line feeds getting added to your
    -- document
    htp.prn( utl_raw.cast_to_varchar2( l_raw ) );
    l_off := l_off+l_amt;
    l_amt := 4096;
    end loop;
    exception
    when no_data_found then
    NULL;
    end;
    end;
    end;
    What I have to do to correct this problem. This demo procedure and table that I am downloaded from oracle. Some where I made a mistake. any help??
    Thanks,
    Nats

    Hi Satish,
    I have set the raw value as 3600 but still its gives the same error only. When I debug the procedure its throwing the error stack in
    SYS.htp.prn procedure of the following line of code
    if (rows_in < pack_after) then
    while ((len - loc) >= HTBUF_LEN)
    loop
    rows_in := rows_in + 1;
    htbuf(rows_in) := substr(cbuf, loc + 1, HTBUF_LEN);
    loc := loc + HTBUF_LEN;
    end loop;
    if (loc < len)
    then
    rows_in := rows_in + 1;
    htbuf(rows_in) := substr(cbuf, loc + 1);
    end if;
    return;
    end if;
    Its a system procedure. I don't no how to proceed .. I am really stucked on this....is their any other method to take picture from the database and displayed in the web page.....???? any idea..../suggesstion??
    Thanks for your help!!!.

  • How do I run a simple script that loads an image into photoshop CS - CS4?

    Hello,
    I am at a loss on how to get my simple application to work. I have a small desktop air application that simply opens Photoshop and runs an action. I used switchboard and the application ran great on PC and MAC. However it only worked for CS3, and CS4 not CS or CS2?. Plus the size of switchboard was a bit large for my small app. I am willing to live with that though . I am using Air with Flex and wanted to know if perhaps there is a beter approach? All the application does is open photoshop, loads an image, and runs an action. Can I do this for all versions of Photoshop using switchboard? Can I do this without switchboard and just use javascript. The big issue is the Air app needs to open Photoshop, and most of the examples have me open PS first and then execute a script located in the PS directory. This needs to work outside of the PS directory. Any examples are appreciated.
    I have looked at the following:
    - SwitchBoard : only works for CS3-CS4 (on my tests)
    - PatchPanel: same issue, plus seperate SDKs
    - ExtendScript: requires script to be run from PS not Air

    Hello,
    I am at a loss on how to get my simple application to work. I have a small desktop air application that simply opens Photoshop and runs an action. I used switchboard and the application ran great on PC and MAC. However it only worked for CS3, and CS4 not CS or CS2?. Plus the size of switchboard was a bit large for my small app. I am willing to live with that though . I am using Air with Flex and wanted to know if perhaps there is a beter approach? All the application does is open photoshop, loads an image, and runs an action. Can I do this for all versions of Photoshop using switchboard? Can I do this without switchboard and just use javascript. The big issue is the Air app needs to open Photoshop, and most of the examples have me open PS first and then execute a script located in the PS directory. This needs to work outside of the PS directory. Any examples are appreciated.
    I have looked at the following:
    - SwitchBoard : only works for CS3-CS4 (on my tests)
    - PatchPanel: same issue, plus seperate SDKs
    - ExtendScript: requires script to be run from PS not Air

  • Using ImageIcon load an image

    Hi I'm having a lot of trouble getting the below code to work. Its copied out of my textbook and its supposed to load an image using the getImage method in the ImageIcon class. The strange thing is I have gotten this to work before, but after I installed Windows 2000 the image doesn't seem to load right anymore.
    getWidth and getHeight - on the image afterwards returns -1.
    Could this be windows 2000's problem? I'm pretty sure it isn't .. but when you run out of ideas, it feels good to put the blame on something other than yourself.
    import java.awt.*;
    import javax.swing.*;
    import java.net.*;
    public class DisplayImage extends JApplet
    public void init()
    ImageIcon icon = null;
    try
    icon = new ImageIcon(new URL(getCodeBase(), "Images/backTile.bmp"));
    catch(MalformedURLException e)
    System.out.println("Failed to create URL:\n"+e);
    return;
    int imageWidth = icon.getIconWidth();
    int imageHeight = icon.getIconHeight();
    resize(imageWidth, imageHeight);
    ImagePanel imagePanel = new ImagePanel(icon.getImage());
    getContentPane().add(imagePanel);
    class ImagePanel extends JPanel
    public ImagePanel(Image image)
    this.image = image;
    public void paint(Graphics g)
    g.drawImage(image,0,0,this);
    Image image;
    Again thx a lot. I know its a lot of code to read. Any help at all would be much appreciated.

    ".bmp" ? Windows bitmap isn't a supported file type, you should save your image as .gif, .png, or as .jpg.

Maybe you are looking for

  • Purchase Order report with MIRO invoice and/or FI invoice number

    Hello, I am searching for a standard report which will allow PO number as input and dispaly the MIRO invoice number/s and if possible the corresponding FI document numbers. I have exhausted all the reports I know of - ME80FN. ME2* series, FBL3N. Thes

  • How to set up trust relationship between oc4j an tomcat

    Howdy According to the EJB 2.0 spec., section 19.8.1.1, second paragraph: "EJB containers are required to provide deployers or administrators with the tools to configure trust relationships with intermediate web or EJB containers." What tools/methods

  • Comparing field with select-option

    HI i have one slect option s_bukrs for coas-bukrs. and loop.. if w_bukrs eq s_bukrs"here is the problem,w_bukrs is    "holding single value and s_bukrs a range,so in such    "case how i can do comaprison endif. endloop

  • Profitability Segment Data On FI Document

    Hi All, I have posted few FI Documents using FB01, while I was posting the entries to the GL Accounts I have entered the Profitability Segment details also. Now if I want to see the details of the Profitability Segments, which table I can use? Those

  • Minor shock, static electricity on iPad 4

    When I am using my iPad and touch the screen there is a minor shock sound, it sounds like a zip (static electricity). Could this be related to what is happening in China? Please help quickly.