×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    7

    How to disable compression of bitmaps on symbian 3rd edition

    Hi,
    I have loaded a SVG image from MIF file. From the loaded image I created several bitmaps with different colors using TBitmapUtil. The final created bitmaps was distorted. I read in Forum that svg icons are compressed. Then I added the API AknIconUtils::DisableCompression() and it works fine for me now. I have done this for symbian 3rd edition FP2.
    Now the problem is i want to port the code to symbian 3rd edition. The above API AknIconUtils::DisableCompression() is unavailable in initial release of 3rd edition. I went through forums and found there is an option \X which can be used with mifconv utility to disable compression. But unfortunately this is available only from symbian 3rd edition FP1. Is there any way to disable compression of SVG images?

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: How to disable compression of bitmaps on symbian 3rd edition

    S60 3rd edition initial release does not support SVG/MIF compression at all, that is why mifconv has no such switch (it can not compress the file), and AknIconUtils has no such method.
    The SVG engine probably evolved over time, so the S60 3rd noFP engine may compatibility problems with certain SVG features which are correctly supported in later engines.
    For example make sure that your SVG-s have viewbox attribute, otherwise AknIconUtils::SetSize may not work well.
    By the way: exactly what kind of distortion do you experience?

  3. #3
    Registered User
    Join Date
    Apr 2010
    Posts
    7

    Re: How to disable compression of bitmaps on symbian 3rd edition

    Thanks for ur response...
    I checked the viewbox attribute of the image. It is set properly. My original image is a grayscale ball from which I construct colored balls. When I display the colored balls on a row, what I see is just a some mixture of color lines drawn. Since I had experienced similar image before disabling compression in Symbian 3rd edition FP2, I assumed the same is happening here. Other images which I display in the application doesn't scale according to the screen dimension. Looks like AknIconUtils::SetSize is not working as expected(I could see the view box attribute in all images). I am generating the SVG-Tiny icons from Adobe Illustrator. What else could be the problem?

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: How to disable compression of bitmaps on symbian 3rd edition

    It probably will not matter, but still: it could make sense checking the code without the coloring-code, just to see how the original gray balls get rendered.
    An other thing you could try is copying the .svg file to the device, and opening it from the File Manager.

  5. #5
    Registered User
    Join Date
    Apr 2010
    Posts
    7

    Re: How to disable compression of bitmaps on symbian 3rd edition

    Your response was really helpful... I opened the .svg images from the File Manager in the device... Got an error 'couldn't open all contents' for the gray ball image. Regarding other images it doesn't get scaled. The problem lies with the images. I will check the creation of images now.

  6. #6
    Registered User
    Join Date
    Apr 2010
    Posts
    7

    Re: How to disable compression of bitmaps on symbian 3rd edition

    I have the svg image of gray ball rendered perfectly via File Manager and my application. But the final colored balls are distorted. The top and bottom of the ball is fine. In the middle it displays multicolored dots. As I had earlier posted this was the same problem encountered using symbian 3rd edition FP2 which was resolved by using AknIconUtils:isableCompression(). If symbian 3rd edition initial doesnt support compression what else could be happening.
    Note: Original gray ball image is GIF which we converted to SVG Tiny.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: How to disable compression of bitmaps on symbian 3rd edition

    Hmm, there can be something about compression: although the .mif files are not compressed in S60 3rd MR, bitmaps in the memory can be compressed: CFbsBitmap has methods like Compress/InBackGround, LoadAndCompress. You can ask it via IsCompressedInRAM, if AknIconUtils automatically applies compression, you can not undo it (your use case may be the reason for introducing DisableCompression in later Symbian releases).
    In this case a possible workaround could be creating your own target bitmap, and BitBlt-ing the loaded one there. Then your own bitmap will not be compressed, and your pixel-level processing will work. The original (compressed) bitmap can be re-used for creating all the coloured ones, and deleted after that (unless you need a gray ball too).

  8. #8
    Registered User
    Join Date
    Apr 2010
    Posts
    7

    Re: How to disable compression of bitmaps on symbian 3rd edition

    Wow it worked finally!!! Thanks Wizard_hu_ for the solution... AknIconUtils was compressing the image. The workaround u gave worked out very well.

Similar Threads

  1. Disable the pop-up of Download details in 3rd edition
    By surya.n.k in forum General Development Questions
    Replies: 0
    Last Post: 2009-02-24, 08:55
  2. Replies: 27
    Last Post: 2008-09-11, 12:40
  3. Disable menu and red key event in 3rd edition devices(N 95)
    By nirajpendal in forum Mobile Java General
    Replies: 3
    Last Post: 2008-09-04, 13:41
  4. Migrating bitmaps to 3rd edition.
    By kernj in forum Symbian
    Replies: 3
    Last Post: 2006-10-19, 22:38
  5. Replies: 1
    Last Post: 2006-09-11, 08:42

Posting Permissions

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