Can I parameterise image attributes?

I am displaying an image in my BI Publisher report, sourcing it from a blob.
<xsl:if test="not(FILENAME='')">
  <fo:instream-foreign-object content-type="image/gif" height="5cm" width="5cm">
    <xsl:value-of select="LOGO_IMAGE"/>
  </fo:instream-foreign-object>
</xsl:if>It works fine, until some of the images get larger heights or widths - I haven't figured out the relation yet, but I thought if I could parameterise the height and width properties, perhaps I could make the report happier.
Is there a way to pass XML values into these fields, such as something like
<xsl:if test="not(FILENAME='')">
  <fo:instream-foreign-object content-type="image/gif" height="SQL_HEIGHT" width="SQL_WIDTH">
    <xsl:value-of select="LOGO_IMAGE"/>
  </fo:instream-foreign-object>
</xsl:if>Which doesn't work, but I thought there might be a way if I got the syntax right...
Thanks.
Scott

I haven't successfully parameterised either those image attribute fields, or the usage of
<fo:external-graphic src="http://my_url:7021/i/loadingAnimation.gif"/> In efforts to do something constructive I tried to parameterise the external-graphic reference instead - since I can't seem to generate anything larger than 32kb worth of XML.
I tried variations of the following, with no success
<?IMAGE_URL?> -- displays the url text
<fo:external-graphic src="?IMAGE_URL?"> -- displays nothing
<fo:external-graphic src="IMAGE_URL"> -- displays nothing
<fo:external-graphic src=?IMAGE_URL?> -- displays nothing
<fo:instream-foreign-object content-type="image/gif">
<xsl:value-of select="IMAGE_URL"/>
</fo:instream-foreign-object> -- displays nothing, but did expand area consumed
Is there syntax I should be using instead, or is this not possible?
Cheers.

Similar Messages

  • Workflow problems: Import selection, 9 keywords in list?, Exporting image attributes...

    I have a few problems incorporating Lightroom into my work flow.
    Is there a way to:
    Select recursive directories when importing photos from disk without
    a copy. Currently, I can only choose files directory(folder) by
    directory.
    Get more than 9 keywords in a shortcut list.
    Add photos from a previously accessed CF card to a catalog in a short
    time.
    Currently it takes about the same time as loading a card from scratch.
    Export image attributes to text file
    (filename followed by keywords, rating...)
    Basic principles of my work flow:
    1. Flash card is used until contents roughly matches the archive media
    size.
    This means a 1GB card fills to 700MB after deleting rejects, and
    a 4GB card will easily fit on a DVD.
    2. Photos on card are categorized and rated/rejected/deleted one or more
    more times while the card is being filled. This results in:
    -Copies of retained images to the categorized directory structure on the
    computer.
    -Rejects deleted from card, and not appearing on the computer
    -Category, and rating information for each image in an easily parsed
    list.
    3. Post processing is done and printing is done on highest rated images
    in each category.
    For example:
    Day 1: start with a blank 4GB CF card, and shoot 1.5GB for customers A and
    B.
    Customer A has 8 subjects a,b,c,d,e,f,g,h; Customer B has 12
    subjects
    a,g,i,j,k,l,m,n,o,p,q,r. Note that some names for customers A and B
    are the same. That night, I delete rejects off the card down to
    800MB,
    and copy the saved images to the directory structure corresponding
    to each customer on the computer. Then a list is printed out to show
    an image+rating list for each subject. Notes are made for each
    "weak"
    subject, so I know who to focus on in the next day of shooting.
    Note I may have needed to do some minor post processing to determine
    rejects and rating.
    Day 2: I shoot 9 subjects for customer A: a,b,c,d,e,f,g,h,s, and 12
    subjects for customer C: j,m,q,t,u,v,w,x,y,z,aa,bb. Similar culling,
    sorting, and copying is done to Day 1.
    Day N: CF card is full, so contents is written to a DVD, then card is
    erased.
    Day M: Sufficient counts of good images are obtained for Customer A, so
    Final post processing is done, and prints are made.
    My initial experimenting with Lightroom shows it has potential to streamline
    the above work flow, but a few key hurdles have kept me from implementing
    it. I have made some assumptions about the tool in the following description,
    so the best help for me would first to point out what assumptions are incorrect
    It looks like "import from device..." only allows a copy from the CF card.
    A copy would mean once images were rejected in the catalog, it would be
    out of sync. with the CF card. So "import photos from disk..." looks
    to be the only way to accomplish principle 1 above. *[minor problem a]* I saw
    no way to import the information from the CF cart recursively in this
    mode. I had to choose the files in groups one directory (folder) at
    a time. When I imported from device, I could grab the whole CF card,
    even though it did a copy. Note another reason I can't copy the CF card
    to the catalog is that the reject/delete operation would not free-up any
    CF card space for the next shoot.
    Rejecting, rating, and categorizing (with keywords) worked easily with
    Lightroom, but *[minor problem b]* it appears the keyword shortcut list is
    limited to 9 entries. Given customers can have more than 9 subjects,
    it would be useful if this could be expanded, even if I implement some sort
    of keyword hierarchy. I suspect the camera will complain about a bad file
    format if I change any of the files on the CF card, but it looks like
    the sidecar files on the computer disk allows me to "modify" images so
    I can get a correct rating without actu

    Do you mean by batches, or the occasional one-off look see? <br /><br />is this following useful? If so, I can tell you how to get it. <br /><br /><tiff:Orientation>1</tiff:Orientation><br />   <tiff:YCbCrPositioning>1</tiff:YCbCrPositioning><br />   <tiff:XResolution>1800000/10000</tiff:XResolution><br />   <tiff:YResolution>1800000/10000</tiff:YResolution><br />   <tiff:ResolutionUnit>2</tiff:ResolutionUnit><br />   <tiff:Make>Canon</tiff:Make><br />   <tiff:Model>Canon PowerShot S80</tiff:Model><br />   <tiff:ImageWidth>3264</tiff:ImageWidth><br />   <tiff:ImageLength>2448</tiff:ImageLength><br />  </rdf:Description><br />  <rdf:Description rdf:about=""<br />    xmlns:xap="http://ns.adobe.com/xap/1.0/"><br />   <xap:ModifyDate>2008-01-04T15:31:04-08:00</xap:ModifyDate><br />   <xap:CreateDate>2007-10-12T19:37:52-07:00</xap:CreateDate><br />   <xap:MetadataDate>2008-01-04T15:31:04-08:00</xap:MetadataDate><br />   <xap:CreatorTool>Adobe Photoshop CS3 Macintosh</xap:CreatorTool><br />  </rdf:Description><br />  <rdf:Description rdf:about=""<br />    xmlns:exif="http://ns.adobe.com/exif/1.0/"><br />   <exif:ExifVersion>0220</exif:ExifVersion><br />   <exif:FlashpixVersion>0100</exif:FlashpixVersion><br />   <exif:ColorSpace>1</exif:ColorSpace><br />   <exif:CompressedBitsPerPixel>5/1</exif:CompressedBitsPerPixel><br />   <exif:PixelXDimension>3264</exif:PixelXDimension><br />   <exif:PixelYDimension>2448</exif:PixelYDimension><br />   <exif:DateTimeOriginal>2007-10-12T19:37:52-07:00</exif:DateTimeOriginal><br />   <exif:DateTimeDigitized>2007-10-12T19:37:52-07:00</exif:DateTimeDigitized><br />   <exif:ExposureTime>1/400</exif:ExposureTime><br />   <exif:FNumber>8/1</exif:FNumber><br />   <exif:ShutterSpeedValue>8643856/1000000</exif:ShutterSpeedValue><br />   <exif:ApertureValue>6/1</exif:ApertureValue><br />   <exif:ExposureBiasValue>0/3</exif:ExposureBiasValue><br />   <exif:MaxApertureValue>116/32</exif:MaxApertureValue><br />   <exif:MeteringMode>5</exif:MeteringMode><br />   <exif:FocalLength>8564/1000</exif:FocalLength><br />   <exif:FocalPlaneXResolution>3264000/286</exif:FocalPlaneXResolution><br />   <exif:FocalPlaneYResolution>2448000/214</exif:FocalPlaneYResolution><br />   <exif:FocalPlaneResolutionUnit>2</exif:FocalPlaneResolutionUnit><br />   <exif:SensingMethod>2</exif:SensingMethod><br />   <exif:FileSource>3</exif:FileSource><br />   <exif:CustomRendered>0</exif:CustomRendered><br />   <exif:ExposureMode>1</exif:ExposureMode><br />   <exif:WhiteBalance>1</exif:WhiteBalance><br />   <exif:DigitalZoomRatio>3264/3264</exif:DigitalZoomRatio><br />   <exif:SceneCaptureType>0</exif:SceneCaptureType><br />   <exif:Flash rdf:parseType="Resource"><br />    <exif:Fired>False</exif:Fired><br />    <exif:Return>0</exif:Return><br />    <exif:Mode>2</exif:Mode>

  • Problems for retrieving image attributes

    Hi,
    I am a new user for Oracle interMedia and i have following problem.
    I have wroten ein java programm to retrieve the image properties. At First, the images (jpg, tif) are stored as BLOB in the table, then i use the function setProperties() to set the image attributes.
    PreparedStatement pstmt = con.prepareStatement("INSERT INTO btable VALUES(?, ORDSYS.ORDImage.init())");
    for (int ef=1; ef<=anzahl_summe; ef++){
    pstmt.setInt(1, ef);
    pstmt.execute();
    OracleResultSet rs = (OracleResultSet)stmt.executeQuery("SELECT * FROM btable WHERE bid = " + ef + " FOR UPDATE");
    while(rs.next()) {
    OrdImage imgObj = (OrdImage)rs.getCustomDatum(2, OrdImage.getFactory());
    imgObj.loadDataFromFile(f_location[ef]);
    imgObj.setProperties();
    OraclePreparedStatement orpstmt = (OraclePreparedStatement)con.prepareStatement("UPDATE btable SET bild = ? WHERE bid =" + ef);
    orpstmt.setCustomDatum(1,imgObj);
    orpstmt.execute();
    orpstmt.close();
    Now if i use the functions getHeight(), getFormat(), ... for querying the properties, i will get just only the values for the image height, width and size. The other attribute values i get either null or ???. I don't understand why. The Bildforamte(jpg, tif)are supported by Oracle.
    Can you tell me what shall i do?
    thank you very much and greeting from germany
    rabbit

    Hi larry,
    thank you for your help. I have set autocommit off and commit in the end of the programm. I think, that is not a problem.
    I use the following table:
    CREATE TABLE bildtable_intern(bild_id int PRIMARY KEY not null, bild ORDSYS.ORDImage)
    My java programm:
    public class OracleBild_intern {
    public Connection connect() throws Exception{
    //thin driver is used
    conn.setAutoCommit(false);
    public void bildmessung(Connection con) throws Exception{
    PreparedStatement pstmt = con.prepareStatement("INSERT INTO bildtable_intern VALUES(?, ORDSYS.ORDImage.init())");
    for (int ef=1; ef<=10; ef++){
    pstmt.setInt(1, ef);
    pstmt.execute();
    OracleResultSet rs = (OracleResultSet)stmt.executeQuery("SELECT * FROM bildtable_intern WHERE bild_id = " + ef + " FOR UPDATE");
    while(rs.next()) {
    OrdImage imgObj = (OrdImage)rs.getCustomDatum(2, OrdImage.getFactory());
    //I have also tried to use loadDataFromInputStream() and loadDataFromByteArray()
    imgObj.loadDataFromFile(f_location[ef]);
    imgObj.setProperties();
    OraclePreparedStatement orpstmt = (OraclePreparedStatement)con.prepareStatement("UPDATE bildtable_intern SET bild = ? WHERE bild_id =" + ef);
    orpstmt.setCustomDatum(1,imgObj);
    orpstmt.execute();
    orpstmt.close();
    pstmt.close();
    retrieveattr(con);
    public long retrieveattr(Connection con) throws Exception{
    OracleResultSet rs = (OracleResultSet)stmt.executeQuery("SELECT * FROM bildtable_intern");
    while (rs.next()){
    OrdImage imgObj = (OrdImage)rs.getCustomDatum(2, OrdImage.getFactory());
    System.out.println("bild_id = " + rs.getInt(1));     
    System.out.println("bild_height = " + imgObj.getHeight());
    System.out.println("bild_width = " + imgObj.getWidth());
    System.out.println("bild_size = " + imgObj.getContentLength());
    System.out.println("bild_format = " + imgObj.getFormat());
    System.out.println("contentformat = " + imgObj.getContentFormat());
    System.out.println("compressionformat = " + imgObj.getCompressionFormat());
    System.out.println("mimetyp = " + imgObj.getMimeType());
    public static void main(String[] args) throws Exception{
    //call the methode connect()
    con.commit();
    con.close();
    I try again, but i get always only the values for image height, width and contentlength. Can you tell me, what ist wrong with this programm?
    Thank you very much and greeting aus germany!
    rabbit

  • Image attribute in h:commandButton tag

    If i use the image attribute in commandButton tag then the value can't be displayed.
    How can the value be displayed when the image attribute is used?
    <h:commandButton image="images/ex.gif" value="Add" action="#{MyBean.add}"/>
    displays only the image with no value.

    I think you cannot do that. Is that possible in simple Html? Why don't you wrtie on the image the value?

  • Why image attribute of h:command_button is not context relative?

    I think It should be. Otherwise, the same page might show the picture or lost it depends of current URL in the address string of browser window.
    P.S. The 'value' attribute of h:graphic_image works very intelligent. It will be great if 'image' attribute of h:command_button will work the same way.

    Any ideas out there on why this inconsistency exists? This is a Bad Thing---we shouldn't have to remember which attributes are context-relative and which are absolute. They should all be context-relative.
    Quoting Mann, JSF in Action (325): "[T]he image property isn't automatically prefixed with the context path (as it is for HtmlGraphicImage). This is a feature that we hope will be added in a future version of JSF. In the meantime, you can either use a value-binding expression or use an HtmlCommandLink instead."
    So is this a specification inconsistency, or an RI bug?
    Garret

  • I can't insert images anymore. Why?

    Hi,
    I've been building web pages just fine inserting my images by clicking Insert and then Image. I did some messing around in the accessibility pane and I thought I only updated it to prompt me if I wanted to change all links internally (and some other stuff) but now I can't insert images this way. The only way I can is if I go over to the image list on the local files list and drag it over and that's a pain and really inefficient for me.
    What happens when I DO click the Insert button, then the image button is that I get a box that says Image Accessibility Attributes and when I try to select an image I get a grey box.
    Another weird thing that is happening is that I can't create a link by highlighting the text and then clicking Hyperlink from the right hand side under Common Inserts.
    I just got a new keyboard yesterday, the kind that plugs into my laptop. Could this be causing my problem too perhaps? Help!
    Thanks,
    Stephanie

    Ok, I just figured it out. What I did when I was editing my preferences was accidentally uncheck the"show dialog box when inserting objects" box and that caused the problem. The way to solve it is to either check the box again or to hit Ctrl-click when trying to insert an image on a Windows computer or Command-click on a Mac. This resolved the hyperlink problem as well. The problem was that I was getting a # sign and the text would disappear. Hope this helps somebody else.
    Thanks,
    Stephanie

  • Can not view images in Aperture

    Mavens!
    I  was editing images in Aperture 3.5.1 ( latest Mavericks / iMAC) and went to add  sharpening using CTRL + S when all the images dissappeared in the viewer.  
    I can still see the thumbnails - I can export original images etc - I just can't see anything in the viewer - it's grey and blank.
    There are NO filters / searches in place (the usual gotcha for hiding images).
    Initially I had the feeling I must have mis-queued the keystroke for sharpening and somehow hidden the images in the library. But now I find that all of my libraries have this problem.  Aperture will only display thumbnails and nothing in the viewer.
    Coudl this be a "delete plist"  scenario?  Any clues for further invesigation greatly appreacited as I'm stumped.
    Ciao
    Russ

    Hello Kirby
    Thank you for yur reply and sorry I have taken so oong to get back to you.  We just had a catergory 2 tropical cyclone cross the coast a few km away - been a little pre-occupied.
    That said - the problem has gone away.
    During the session where it arose I restarted the system twice and the systems persisted - so I am a little mystified.
    And again thank you for reminding of the "try new user account" wrinkle  - obviously the first step for serious troubleshooting.
    Kind regards
    Russell

  • Can not upload image of larger size in jsf

    i had some issues in file uploading. File uploading is working fine in my local machine and when i am using the www.mywebsite.com:8080/fileUpload.jsf
    but i can not upload images by using the following www.mywebsite.com/fileUpload.jsf
    Ie: without the port. I am using windows server and tomcat 5.5.27
    When i am trying to upload a bigger size image i am getting the following error
    I am using jsf(tomahawk)
    09:10:47,315 ERROR MultipartRequestWrapper:? - Exception while uploading file.
    org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Socket read failed
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384)
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:181)
    at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:42)
    at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:91)
    at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:159)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.getSequenceString(JspStateManagerImpl.java:260)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:230)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:267)
    at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:231)
    at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:81)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at com.zerone.rrs.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:444)
    at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
    at java.lang.Thread.run(Unknown Source)

    Never mind . problem solved after i restarted

  • Can not view images of Patents (i.e., D/359,691) on USPTO.gov Patent search, it tells me I need a plugin (Quicktime 7.7.1.0) which I updated already.

    Can not view images of Patents (i.e., D/359,691) on USPTO.gov Patent search, it tells me I need a plugin (Quicktime) which I updated already.
    In the "Quick Search" I give terms & it compiles a list. I then go through to each doc and look to view the doc and associated drawings. I'm not sure what else to say at this juncture.
    Thanks.

    Wonderful, not only did I get the issue resolved, but I got some good tools in the process.
    Thank you so much for your insight and assistance.

  • Java Application [Java Bundler]: how I can use an image? Which path?

    Hi,
    how I can use an image in my Java Application when I create the jar bundle with Jar Bundler? Which is the path of the file? I don't know if I got it across...

    By image, do you mean an icon for your program?
    If so, then you need to create the image you want using any graphical drawing program, then use a utility such as Img2icns to put the image into the correct format (.icns). Once you have this, you can drag it into Jar Bundler and IIRC it just works.
    Bob

  • How can I assign image file name from Main() class

    I am trying to create library class which will be accessed and used by different applications (with different image files to be assigned). So, what image file to call should be determined by and in the Main class.
    Here is the Main class
    import org.me.lib.MyJNIWindowClass;
    public class Main {
    public Main() {
    public static void main(String[] args) {
    MyJNIWindowClass mw = new MyJNIWindowClass();
    mw.s = "clock.gif";
    And here is the library class
    package org.me.lib;
    public class MyJNIWindowClass {
    public String s;
    ImageIcon image = new ImageIcon("C:/Documents and Settings/Administrator/Desktop/" + s);
    public MyJNIWindowClass() {
    JLabel jl = new JLabel(image);
    JFrame jf = new JFrame();
    jf.add(jl);
    jf.setVisible(true);
    jf.pack();
    I do understand that when I am making reference from main() method to MyJNIWindowClass() s first initialized to null and that is why clock could not be seen but how can I assign image file name from Main() class for library class without creating reference to Main() from MyJNIWindowClass()? As I said, I want this library class being accessed from different applications (means different Main() classes).
    Thank you.

    Your problem is one of timing. Consider this simple example.
    public class Example {
        public String s;
        private String message = "Hello, " + s;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example();
            ex.s = "world";
            System.out.println(ex.toString());
    }When this code is executed, the following happens in order:
    1. new Example() is executed, causing an object to constructed. In particular:
    2. field s is given value null (since no value is explicitly assigned.
    3. field message is given value "Hello, null"
    4. Back in method main, field s is now given value "world", but that
    doesn't change message.
    5. Finally, "Hello, null" is output.
    The following fixes the above example:
    public class Example {
        private String message;
        public Example(String name) {
            message = "Hello, " + name;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example("world");
            System.out.println(ex.toString());
    }

  • How can we assign one attribute set to multiple business partners at a time ?

    How can we assign one attribute set to multiple business partners at a time ? Is it possible ? Can anyone explain me ?

    Hello,
    please refer to the following thread:
    How can we assign one Attribute Set to multiple Business Partners at a time? Is it possible?
    best regards,
    Johannes

  • How can I display images that are not included in any collection?

    How can I display images that are not included in any collection (some filter or smart collection)? A smart collection with parameters "Collection - contains - empty field" does not work. Lightroom 5.

    Thank you! Good idea! I ordered letters of the alphabet (space separated), and it works.

  • How can I draw image in a vbean?

    How can I draw image in a vbean?
    this is my code :
    import java.awt.BorderLayout;
    import java.awt.Image;
    import java.awt.Graphics;
    import java.net.MalformedURLException;
    import java.net.URL;
    import com.sun.jimi.core.Jimi;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.VBean;
    public class PrintEmailLogo extends VBean {
         URL url;
         Image img;
         boolean ImageLoaded = false;
         public void paint(Graphics g) {
              if (ImageLoaded) {
                   System.out.println("yes~~~");
                   g.drawImage(img, 0, 0, null);
              } else
                   System.out.println("no~~~");
         public boolean imageUpdate(Image img, int infoflags, int x, int y, int w,
                   int h) {
              if (infoflags == ALLBITS) {
                   System.out.println("yes");
                   ImageLoaded = true;
                   repaint();
                   return false;
              } else
                   return true;
         public void init(IHandler arg0) {
              super.init(arg0);
              try {
                   url = new URL("file:print/77G.gif");
                   img = Jimi.getImage(url);
                   Image offScreenImage = createImage(size().width, size().height);
                   Graphics offScreenGC = offScreenImage.getGraphics();
                   System.out.println(offScreenGC.drawImage(img, 0, 0, this));
              } catch (MalformedURLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    but when I run it in forms
    when it run Graphics offScreenGC = offScreenImage.getGraphics();
    It throw a exception:
    java.lang.NullPointerException     at com.avicit.aepcs.calendar.PrintEmailLogo.init(PrintEmailLogo.java:72)     at oracle.forms.handler.UICommon.instantiate(Unknown Source)     at oracle.forms.handler.UICommon.onCreate(Unknown Source)     at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)     at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)     at oracle.forms.engine.Runform.processMessage(Unknown Source)     at oracle.forms.engine.Runform.processSet(Unknown Source)     at oracle.forms.engine.Runform.onMessageReal(Unknown Source)     at oracle.forms.engine.Runform.onMessage(Unknown Source)     at oracle.forms.engine.Runform.processEventEnd(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)     at java.awt.Component.dispatchEventImpl(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.EventQueue.dispatchEvent(Unknown Source)     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)     at java.awt.EventDispatchThread.run(Unknown Source)
    I change it to:
    import java.awt.BorderLayout;
    import java.awt.Image;
    import java.awt.Graphics;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.swing.JFrame;
    import com.sun.jimi.core.Jimi;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.VBean;
    public class PrintEmailLogo extends VBean {
         URL url;
         Image img;
         public void paint(Graphics g) {
              try {
                   url = new URL("file:print/77G.gif");
                   img = Jimi.getImage(url);
                   g.drawImage(img, 0, 0, this));
              } catch (MalformedURLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public void init(IHandler arg0) {
              super.init(arg0);
    But it display nothing.
    It isn't paint continuous.
    what's wrong in my vbean?
    please help me.

    The following code works fine for me:
    package oracle.forms.fd;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.CustomEvent;
    import oracle.forms.ui.VBean;
    public class test extends VBean {
      private URL url;
      private URL m_codeBase; 
      private Image img;
    public void paint(Graphics g) {
      // draw the image
      g.drawImage(img, 0, 0, this);
    public void init(IHandler arg0) {
       super.init(arg0);
       // load image file
       img = loadImage("file:///c:/coyote.jpg");   
    public test()
        super();
       *  Load an image from JAR file, Client machine or Internet URL  *
      private Image loadImage(String imageName)
        URL imageURL = null;
        boolean loadSuccess = false;
        Image img = null ;
        //JAR
        imageURL = getClass().getResource(imageName);
        if (imageURL != null)
          try
            img = Toolkit.getDefaultToolkit().getImage(imageURL);
            loadSuccess = true;
            return img ;
          catch (Exception ilex)
            System.out.println("Error loading image from JAR: " + ilex.toString());
        else
          System.out.println("Unable to find " + imageName + " in JAR");
        //DOCBASE
        if (loadSuccess == false)
          System.out.println("Searching docbase for " + imageName);
          try
            if (imageName.toLowerCase().startsWith("http://")||imageName.toLowerCase().startsWith("https://"))
              imageURL = new URL(imageName);
            else if(imageName.toLowerCase().startsWith("file:"))
              imageURL = new URL(imageName);
            else
              imageURL = new URL(m_codeBase.getProtocol() + "://" + m_codeBase.getHost() + ":" + m_codeBase.getPort() + imageName);
            System.out.println("Constructed URL: " + imageURL.toString());
            try
              img = createImage((java.awt.image.ImageProducer) imageURL.getContent());
              loadSuccess = true;
              System.out.println("Image found: " + imageURL.toString());
              return img ;
            catch (Exception ilex)
              System.out.println("Error reading image - " + ilex.toString());
          catch (java.net.MalformedURLException urlex)
            System.out.println("Error creating URL - " + urlex.toString());
        //CODEBASE
        if (loadSuccess == false)
          System.out.println("Searching codebase for " + imageName);
          try
            imageURL = new URL(m_codeBase, imageName);
            System.out.println("Constructed URL: " + imageURL.toString());
            try
              img = createImage((java.awt.image.ImageProducer) imageURL.getContent());
              loadSuccess = true;
              System.out.println("Image found: " + imageURL.toString());
              return img ;
            catch (Exception ilex)
                    System.out.println("Error reading image - " + ilex.toString());
          catch (java.net.MalformedURLException urlex)
            System.out.println("Error creating URL - " + urlex.toString());
        if (loadSuccess == false)
          System.out.println("Error image " + imageName + " could not be located");
        return img ;
    }Francois

  • How can I display images in drop down.

    Hi All,
    How can I display images in drop down.
    <select><option>image here</option></select>
    please reply soon.
    anser please
    Thanks

    I have not found html forum..That's just incredible.
    where can i find it ?Sorry, I'm still recovering from that remark.
    please reply soonEvery time you end a post with this, or "urgent" or other such keywords, the forum automatically introduces a 5 minute delay so that will actually make the whole process slower (not faster).

Maybe you are looking for

  • Cannot install Web Management Gateway (KB968934) on Windows 2003 SP2 Enterprise

    I have installed the following prerequisites:.Net Framework 3.5 SP1, KB969166 and KB969429.  I also update my Windows Installer to 4.5. Installation of the Web Management Gateway is failing saying I don't have a prerequisite.  I don't know what else

  • App Object Run Order Not Honored

    Currently we use 'Wait on force run' and 'Determine force run order' to deliver applications in the order required. This was working okay until recently and I am unable to identify why. Our configuration has application delivery timer start that is s

  • Public Key Server

    Does Oracle have a Public Key Server platform?  If not, what would you suggest to use to make one? I have looked into the follow platforms and I have some concerns about each: http://pks.sourceforge.net/ https://bitbucket.org/skskeyserver/sks-keyserv

  • Update screwed everything up

    I recently updated my 3GS to 4.0. What a major mistake. Now my address book has phone numbers assigned to the wrong people, the phone calls out by itself, the voice dial doesn't work correctly (I tell it to call "home" and it answers back "calling Fr

  • Odd error when trying to search on btplc

    Is this at my end? CFML Runtime Error General SQL Error Request /search/index.cfm File Trace //rdfp0282/extranet/*********/search/index.cfm | +-- //rdfp0282/extranet/*********/search/SuggestedLinks.cfm Type Database Query Error An error has occurred