How to display large image in JAI

dear all,
could anyone tell me how do i display an image which is around
5000x5000 pixels in JAI. I try to use BufferImage to store the image
but JVM throws" out of memory " error while program is running.
thanx a lot!

Hi,
do you want to work with the image or do you only want to show it into a container?
you can increment the JVM Memory available space. Or you can split the image into smaller BufferedImage, draw it and call the gc...

Similar Messages

  • How to display large image using JAI

    dear all,
    could anyone tell me how do i display an image which is around
    5000x5000 pixels in JAI. I try to use BufferImage to store the image
    but JVM throws" out of memory " error while program is running.
    thanx a lot!

    just a rough estimate, but a 5000x5000 image would require at least 24MB assuming each byte is one pixal, I believe they are 4 bytes per pixel in RBGA format. (5000*5000) = 25,000,000 pixals /1024/1024 = 23.8MB for 1 byte pixals, *4 for 4 byte = 95.3MB. I'm pretty sure that this is how it stores it. Maybe I'm wrong but it certainly explains the situation. assuming you have at least 256MB ramm, run java with -Xmx200M and see what happens.
    java -Xmx200M app
    or if you have more ramm, like 512, use 450 or 500.

  • How to dispaly large images?

    Hi!
    I have a simple problem, hope somebody could help me!
    I would like to display images from a LONG RAW type column of an Oracle database (Oracle8i Enterprise Edition Release 8.1.6.0.0) in a BC4J application. I use JDEV 9.0.3.
    The wizard generated entity object's attribute type for the image field is raw, i could not find the LONG RAW type in the java types. The maximun size of the raw type is 2000 bytes, so my app can not handle and display large images. How could i solve this problem? Pls help me!
    I have read the otn forum tips, but they did not help me :((
    Thanx
    Bence

    You may try mapping your column to BlobDomain!
    If that doesn't fit the need, you'd have to create a similar LobDomain (see BlobDomain.java source in bc4jdomorcl.zip) for LongRawDomain so that it uses streamnig apis to fetch data from jdbc rather than using a column-value fetch.

  • How to display a image in webdynpro view using a bytearry

    Hi Frndz..
    How to display an image in a view using webdynpro java ..i have bytearry object in context ..like
    *byte[] img = wdContext.nodeYywwwdataImport_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();*_
    by using this i need to show image in view..
    Kindly help me ....
    Thankas in Advance
    Regards
    Rajesh

    Hi,
    byte[] img = wdContext.nodeYywwwdata_Import_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();
    use this code to create resource and you need to set this value to the context created to display the image suppose in the image UI and set the source property with this attribute:-
    IWDResource res=WDResourceFactory.createCachedResource(b,"MyImage",WDWebResourceType.JPG_IMAGE);
    IPrivateAppView.IVn_ImageTabElement imageEle=wdContext.createVn_ImageTabElement();
           imageEle .setVa_Name(res.toString());
    wdContext.nodeVn_ImageTab().addElement(imageEle);
    Hope this may help you.
    Deepak

  • How to Display an Image on my FORM

    Good Day!
    I would like to ask some help from you guys with my problem on how to display an image on my form. I would like to display my uploaded image on my form but instead of an image, the get_blob_file is showing. By the way, I'm using Apex 4.1
    I downloaded the Order Entry Sample Application and followed the Page 6, the Product Details. I even made snapshots of each details from Page Rendering to Page Processing in order not to miss a thing.
    At the moment, I was able to upload or store the image on my created Oracle table and also able to retrieve it on the Download Link Text with Content Disposition value of Inline, provided by APEX Settings. If I invoke the Download link beside the file browser, a page with the image will be shown, below is the address:
    http://127.0.0.1:8080/apex/apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6&p_content_disposition=inline
    However, instead of showing the image on a region, below is the one showing on my Form:
    <img src="apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6" />
    As you can see the parameter values are the same but I know I missed something that's why I'm here :)
    I would highly appreciate all the help you can provide and many thanks in advance.
    I tried to change gear by making an html region of type PL/SQL (anonymous block) and a procedure but still no image :(
    Below are the scripts.
    declare
    cursor cur is
    select *
    from wsemployee
    where empid = :P230_EMPID;
    begin
    for rec in cur
    loop
    IF rec.mime_type is not null or rec.mime_type != '' THEN
    htp.p( '<img src="my_image_display?p_image_id='||NVL(rec.empid,0)||'" height="'||100||'"/>' );
    else
    htp.p( 'No Image ');
    END IF;
    htp.p( ' ');
    end loop;
    end;
    PROCEDURE
    create or replace PROCEDURE my_image_display( p_image_id IN NUMBER)
    AS
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, PHOTO_BLOB_CONTENT, PHOTO_FILENAME,DBMS_LOB.GETLENGTH(photo_blob_content)
    INTO l_mime,lob_loc,l_file_name,l_length
    FROM wsemployee
    WHERE empid = p_image_id;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(l_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || l_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(l_file_name,instr(l_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    END my_image_display;
    Edited by: user13831927 on Dec 22, 2012 3:24 PM

    Hi Ying,
    you can add a UDF to the table spp2 with a programm
    but the table is not yet listed in the 'Manage User Fields' form.
    there's no way to "enable" it - sorry

  • How to view large images ?

    i just updated my phone c601 from symbian anna to belle..may i know how to view large images in the nokia internet browser..i cant change it

    sorry,since i have just updated my mobile,i can't show you how large is it,
    but i can show you how small is it...
    even though i click 'more>view image',
    the image that shows me is just that small....
    Attachments:
    scr000001.jpg ‏102 KB

  • How to display an Image which is on Panel behind JScrollPane - Please Help

    Hiii All,
    How to display an Image which is on Panel behind JScrollPane. I have set the setOpaque() method of JScrollPane to false still when i run the program the JScrollPane is set as Opaque.. Can some one please help me in this...
    Thanks,
    Piush

    you need to set both
    scrollPane.setOpaque(false);
    scrollPane.getViewport().setOpaque(false);

  • How to display the image which in KM folder using url iview

    Hi Friends
    How to display the image, which is under KM folder structur using the url iview.
    i trying using url iview url as  \document\testfolder\abc.jpg as url for the iview.
    but its now working .. so please help me how to slove this problem
    If is not the correct way then please suggest me best way to achive this.
    Thanks
    Mukesh

    Hi Mukesh,
    I think this may work,
    1, Create a HTML Layout.
        You can put your image wherever  u want with HTML Codes.
        Check this, [Article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3915a890-0201-0010-4981-ad7b18146f81] & [Help|http://help.sap.com/saphelp_nw04/helpdata/en/cc/00c93e9b2c3d67e10000000a114084/frameset.htm]
        With this, u can use the standard KM commands also.
    2, U need to use KM Navigation iView for this rather than KM Doc iView.
    3, In the Nav iView, u can use &rndLayoutSet=nameOfUrHTMLLayout to force the view with this new layout.
    Regards
    BP

  • How to display an image in an alv grid in each corresponding row?

    Hi,
    please tell me how to  display an image in an alv grid in each corresponding row, like;;
    tony            23   newyork      <image>
    Mkitharyan  63   washington  <image>
    NOT BY HOTSPOTS/URL.

    you can put image in each cell you want:
    data lo_cmp_usage type ref to if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      if lo_cmp_usage->has_active_component( ) is initial.
        lo_cmp_usage->create_component( ).
      endif.
      DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
      lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_alv( ).
        DATA lo_value TYPE ref to cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(    ).
    data col type ref to  CL_SALV_WD_COLUMN.
    col = lo_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'IMAGE' ).
    data image type ref to cl_salv_wd_uie_image.
    CREATE OBJECT image.
    image->SET_SOURCE_FIELDNAME( 'IMAGE' ).
    COL->SET_CELL_EDITOR( image  ).

  • Displaying large images in MIDP 2.0

    Hello,
    I've been building a little file browser in MIDP 2.0. Now I'd like to add some file opening in, too.
    Videos and sound can be played quite easily using the MMAPI.
    But images are a tougher case. I haven't found any way to display images using the MMAPI, and loading big images with Image.createImage causes an OutOfMemoryException.
    So, does anyone know a trick (extensions are OK too) to display large images with? Naturally downsizing, as in the case of videos, is OK too.
    -- Mikko

    about image resizing, it is very difficult issue.
    I did this code for my company in 2 whole weeks. and sure I can not post it.
    pluse this code was only for Jpeg files.
    I still can give u some hints,
    1- There is open source code I dont remeber its name ,I think it was JPEG Decoder for J2ME try to search for this.
    this code is said to be for J2ME, pulshit . when u just instansiate instance from this class u got OutOfMemory Error. but this code still good as concept.
    2- Use the previous code to do the decoding while reading, I mean u will have to open stream on ur file then decode the data and resize.
    Good Luck

  • How to display an image, which is stored in a database?

    Hi All,
    I would like to display an image with Web Dynpro.
    I already know how to display an image which is stored in the path src/mimes/Components/...
    But does anybody knows, how to display an image which is stored in a database (e.g. MaxDB)as a datatype of binary?
    Thanks in advance!
    Regards,
    Silvia

    Hallo John,
    yes, you can use the Image UI element.
    Further you have to create a String for the URL. Implement like as follows:
    IWDCachedWebResource cachedResource = null;
    String imgUrl = null;
    WDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute(IPrivateXYView.IXYElement.PIC_DB);
    IWDModifiableBinaryType binaryType =
                   (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
    binaryType.setMimeType(WDWebResourceType.JPG_IMAGE);//Example *.jpg
    WDWebResourceType type = binaryType.getMimeType();
    byte[] file = wdContext.currentXYElement().getPicDB();
    if (file != null)
    cachedResource = WDWebResource.getWebResource(file, type);
    try
    imgUrl = cachedResource.getURL();
    catch (WDURLException e)
    IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                        msgMgr.reportException(e.getLocalizedMessage(), true);
    I hope it will help you.
    Regards,
    Silvia

  • Displaying Large Images and Out of Memory Error

    hi,
    I am relatively new to JAVA and I have been trying to display a large jpeg in a scrollpane. The image is about 30 mb in size and is very long. When compressed the image is very small (1mb) but when uncompressed it increases in size due to the black background. I have been looking all over the place to find a method to display such a large image. I read a little bit about the JAI and its tile features but I am not really familiar with it. Also the image has to be displayed in an applet. the whole mess has to do with the JAVA VM memory restrictions as it does not have enough memory to process the image. Is there a way to uncompress a part of the JPEG and display it or assign addittional memory to JAVA. I will really appreciate any help on this topic.
    thanks

    Hiya.
    I can't say I know how to save Java from large images, but you can up the memory allocated to the JVM:
    java -Xmx120M ...
    will give 120M to the JVM (max). There is an -Xms also which gives the initial allowed space.
    Regards.
    Paulj.

  • How to get larger images in albums?

    I just realized that when you click on a thumbnail in one of my albums, the larger image is actually smaller than the original photo! All the photos I've put into my web albums have been shrunk to fit into the album display area. For instance, a photo that normally displays about 7 inches high when I view in Preview, comes out about 4.5 inches tall when displayed in my web album.
    How can I get it to display photos at actual size?

    Ray Dunakin wrote:
    I tried turning off "optimize images", but they still were showing up at the reduced size.
    providing a url to your site so people could have a look at what's going on may help...
    What I'd really like is a way to designated specific images to display at a larger size -- most don't need to be very large, but some do.
    I think that's not possible in iWeb PhotoPages... As you choose one format for all. However to get larger images in albums click on a photo and a window will popup called "Photo grid". You can increase the size of the images displaying by reducing the spacing and/or decreasing the number of columns.
    Regards,
    Cédric

  • How to print large image across several pages?

    After using Appleworks for years I finally got Pages 09. In AW I used to be able to use drawing app to print large (36 x 36) images over several pieces of paper, simply by adding pages to the document. I would then tape the pages together to form the large poster. I can't see anyway to do this in Pages. It won't let you print any larger than 11x17, nor let you add pages to a layout to print a large image. Anybody know how to do this, or did I just waste my money?

    Welcome to Apple Discussions
    Yvan Koenig discovered with iWork '08 that you can span images across pages in a Numbers document as a substitute. Select & delete any tables & then treat the Numbers document as a draw document. You shouldn't need to add pages like in AppleWorks as Numbers adds them as needed to display all of the content.

  • Displaying large images

    On blog or news item pages etc. it would be common to display
    an image as no more than a certain width, regardless of the actual
    image size, simply for fast loading and consistent visual
    presentation. However, I would like users to be able to see the
    image full size if required.
    The obvious approaches are when clicking on the image, to
    either show it full size in the current browser window or to create
    a new window to show it, probably using JavaScript to open a window
    the same size as the image.
    Both have their pros and cons and the other issue is that it
    is always annoying to click on an image only to discover that the
    original was no bigger anyway!
    Does anyone have any thoughts on how best to handle images?
    Thanks.

    > On blog or news item pages etc. it would be common to
    display an image as
    > no
    > more than a certain width, regardless of the actual
    image size
    This is mistaken. A large image will fetch as its native size
    regardless of
    how you display it on the page.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "UsuallyConfused" <[email protected]> wrote
    in message
    news:f7i90a$lns$[email protected]..
    > On blog or news item pages etc. it would be common to
    display an image as
    > no
    > more than a certain width, regardless of the actual
    image size, simply for
    > fast
    > loading and consistent visual presentation. However, I
    would like users to
    > be
    > able to see the image full size if required.
    >
    > The obvious approaches are when clicking on the image,
    to either show it
    > full
    > size in the current browser window or to create a new
    window to show it,
    > probably using JavaScript to open a window the same size
    as the image.
    >
    > Both have their pros and cons and the other issue is
    that it is always
    > annoying to click on an image only to discover that the
    original was no
    > bigger
    > anyway!
    >
    > Does anyone have any thoughts on how best to handle
    images? Thanks.
    >

Maybe you are looking for

  • Can Labview DAQ work on a self-trigg​ering basis?

    Currently I have the following setup: We shoot electrons through a diamond (which is attached to a electronics board via electrodes), then the electrons pass through a scintillator.  We use the scintillator/phototube as the trigger pulse right now, b

  • Region Setting on MacBook pro - no longer CD rediness supported

    Hi, I live in Europe, but I'm quite often travelling to the US. Yesterday I bought a DVD movie in US with region code. Since I'm using Vista for Outlook purposes on my MacBook Pro I was too lazy to boot in Leopard. So I was asked by Vista to set the

  • Varchar Column Returning Null Value

    Hi I have a report with a subquery which contains a dynamic from clause which is set by the main query, the report returns date and number values from the view in the subquery but does not return varchar2 values, if I select the varchar2 values from

  • When printing from a website the date and website line on the printed page is in gibberish

    when i print from a website why are the date and website lines at the top and bottom of the page in gibberish?

  • InDesign 5.5 Animation rotation

    I'm using the animation tool in InDesign to animate a watch. I have a second hand that I want to go half way around the face of the clock but I cannot stop the animation from easing in and out. Even when I select 'Speed None' it still speeds up and t