×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    5

    Displaying large images S40 J2ME

    I want to display large images (jpg or png format is not important), the image size about 1200x2000.
    Heap size is small 1mb, so no chance to use createImage.

    I've found similar topics in forum but could find an answer.

    If this is not possible, maybe there is an option to load a portion of an image, without loading the whole image? (I know it's can't be done with compressed images, but maybe it will work with uncompressed?)

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Displaying large images S40 J2ME

    It is not practical to load part of an image.

    The best approach is probably to split the image into many smaller images, and to load only those images necessary to display the visible area.

    You might like to read this conversation on the same subject.

    Graham.

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    5

    Re: Displaying large images S40 J2ME

    This is not an option if the user must split the image before using the app.
    If app can do the splitting it's ok, but in this case we return again to the original problem: to split the image we need to load it first...

    p.s.
    How camera application display images?

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Displaying large images S40 J2ME

    Ahh... if the image is not under your control, that's more of a problem.

    It is possible, but I think you'd need to write your own image decompression code, that could decompress only part of the image.

    The camera app is not Java. It's a native app, so has access to more memory, camera/image hardware and so on. It can do things that a Java app cannot.

    Graham.

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    5

    Re: Displaying large images S40 J2ME

    What about doing something like this:
    First to choose simple image format to work with: maybe png.
    To read big image into bytearray (is there a problem reading big files into an array?).
    Knowing image structure, split the array into sub arrays.
    Use:
    public static Image createImage(byte[] imageData, int imageOffset, int imageLength)
    to create a small image.


    What else can you suggest?

Similar Threads

  1. Displaying large amount of formatted text in a CAknMessageQueryDialog
    By Matwilky in forum Symbian User Interface
    Replies: 3
    Last Post: 2011-05-18, 14:40
  2. Displaying large photos, videos
    By Larry101 in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-18, 17:00
  3. How to handle large images?
    By berni4 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-03-07, 19:10
  4. Displaying large amounts of text?
    By ke2408 in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-06-18, 13:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×