×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    145

    why can't JPEGs be drawn directly

    hi all,

    this could be very basic question.

    I just want to want to know

    1) is it possible to draw JPEGs directly in container ? Because I need to take very time consuming steps in order to make an image draw(display) on screen.

    2) if yes then how ?

    3) if no then why JPEGs can't be drawn/displayed directly on screen(container) ?

    4) Is there any other format beside BMP that can be drawn directly?

    regards
    dotcdotc

  2. #2
    Registered User
    Join Date
    Sep 2003
    Location
    Mumbai, India
    Posts
    25
    Use CMdaImageFileToBitmapUtlity or CMdaImageDescToBitmapUtlity to load up BMPs, JPGs, PNGs and WBMPs. Check the SDK's documentation for more information.

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    nothing can really be drawn directly. The fastest image format is mbm, which loads very fast indeed.

    All images needs to be converted to bitmap presentation before drawing them, and processing compressed images such as JPG takes more time.

    yucca

  4. #4
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    145
    thankyou yucca and hoopsman.

    So conclusion is that the only format that can be displayed on screen is Bitmap format. Nothing can be drawn directly , be it JPEGs, PNGs or anything else.

    They need to be converted in Bitmap using CMdaImageFileToBitmapUtlity/CMdaImageDescToBitmapUtlity which is deprecated in Symbian 7.0s or ICL (CImageDecoder) which I am already using.

    I have conducted a test.
    -------------------------------------------

    I am loading 7 JPEGs from device (brand new 7610). Average size of an Image is 249KB. Operations being performed are Conversion from JPEGs to Bitmap and then Scaling to 50x50 size icons and finaly drawing the icons on screen. Reslution of all images is 1152x864.

    And it takes exactly 56 seconds which is 100% not practical. Though in my program file session is being created for each file but I guess that will not take much time.

    I am using ICL. How it can be improved ?

    regards
    dotcdotc

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    basically you should make the images to right size before using them in the application.

    Basically there is no use of having 1152x864 sized images if you are always only drawing 50x50. 50x50 images could also be saved as mbm files, so you could use simple load() function to load it to bitmap object. This would propably make the loading already acceptable.

    in case you need to use the big size images as well, then, just make the additional thumbnails sized 50x50 to show where the small size is applicaple, just as the normal photo selection is doing already.

    yucca

  6. #6
    Registered User
    Join Date
    Sep 2003
    Location
    Mumbai, India
    Posts
    25
    It seems you are making thumbnails out of camera-captured images which are 1152x864 in size on the mega-pixel 7610. This is quite a substantial resizing operation (1152x864 to 50x50) . I think there is no way to cut down on the time taken. What you can try is use DrawBitmap() from the GC to directly blit the larger image to the 50x50 area. Atleast this will cut one explicit step (resize) from the entire process. Be warned though ... Resize-Blits in Symbian are quite slow too! Hope that helps!

  7. #7
    Registered User
    Join Date
    Dec 2004
    Posts
    28
    Hi yucca,

    Is it possible to create a MBM out of jpegs?

    Can you add jpegs in the resource files? Just like adding bitmap files to create mbm?

    tnx

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    as far as I know you need to use bmp's as a source of mbm files, at least when using bmconv to do it.

    yucca

  9. #9
    Registered User
    Join Date
    Jul 2004
    Posts
    93
    You might use the thumbnail class, which will create a small file (both size and resolution) when there is no thumbnail or thumbnail is outdated. Next load will be faster.

    Loading a megapixel image in 7610 with ICL would take around 1-2 seconds. There seems no way to improve but wait for faster phone from Nokia.

    Oh the media you use might matter, a slow MMC compare with phone memory, for example.

    luke

    p.s. for how to use thumbnail, search the forum and you will find many posts, some with codes.

  10. #10
    Registered User
    Join Date
    Feb 2005
    Posts
    34

    Problem with ICL

    When using

    iImageDecoder=CImageDecoder:ataNewL(iFs,des,_L8("image/jpg"),CImageDecoder::EOptionAlwaysThread);

    it throws error.
    Iam trying to convert the TDesC8 data read from a jpg file and convert it to BMP.

    The program I use is the imageConverter from ForumNokia modified for the purpose. It shows "When Starting to decode: -20".
    Please help.

    Thanks,
    Laila

  11. #11
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    145
    hi Laila,

    error code -20 means "currupt". The data source you are using to create the image seems to be currupted.

    regards,
    dotcdotc

  12. #12
    Registered User
    Join Date
    Jul 2004
    Posts
    93
    hi Laila,

    You may use CImageDecode::FileNewL(...) instead of DataNewL(...). You pass a CFbsBitmap* in and the decoded will data (in bitmap) will be store there.

    Look for Image Converter Engine in FN download section.

    Regards,

    luke.

  13. #13
    Registered User
    Join Date
    Feb 2005
    Posts
    34
    thanks...
    where do you get the error code descriptions from?

    And have you any sample codes which seperate the JPEG from the stream of MJPEG.

    Thanking you,
    Laila

  14. #14
    Registered User
    Join Date
    Oct 2005
    Posts
    12

    Re: why can't JPEGs be drawn directly

    Hi Guys,

    We are also having problems with images(MJPEG) not being able to be displayed on Nokia 6680 phones. We think it is a firmware issue because in previous firmware versions V2.39.140 (tested with Nokia 6630) the images can be displayed without problems. Therefore, it would be logical that newer firmware versions can also support mjpeg, since most software are backward compatible;but it seems not to be the case.

    Can anyone at Nokia help us resolve this issue?

    Many telecom providers we are in discussion with are very interested in our solution but so far the only 3G phones that can sucessfully our MJPEG are motorola. They perfer to have the Nokia phones be able to display MJPEG also.

    Since motorola 3G phones (E1000. v975) can display MJPEG I am at a lost as to why Nokia 3G phones with the new firmware cannot.

    we alone cannot solve this problem. We need assistance from Nokia HQ.

Posting Permissions

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