• AVR Freaks

Bug in Microchip Bitmap and Font converter Utility???

Author
Renjith Vamanan
Senior Member
  • Total Posts : 150
  • Reward points : 0
  • Joined: 2009/05/16 08:57:19
  • Location: India
  • Status: offline
2009/06/21 06:28:07 (permalink)
0

Bug in Microchip Bitmap and Font converter Utility???

Hi all,
 
I think I have found a bug in the Bitmap and font converter utility by Microchip
provided with the Grpahics library, and Iam stuck now because of that.
 
I am converting the BMP to a C file and displaying it by myself without using the grpahics library functions.
I converted a 4bit BMP image to Internal Flash C file, but the Raster data in the generated file is not organised as
they say in the Help file. But in the case of a 1-bit(Black/White) BMP it is generating the file as expected and it is working fine.
 
Please find the attached the BMP image, Generated C file and my findings.
 
Please check it whether it is a bug in the utility of or My fault...
 
Thanks in advance.
Renjith
 

Attached Image(s)

#1

13 Replies Related Threads

    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 06:29:06 (permalink)
    0
    Attaching the other files

    Attached Image(s)

    #2
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 06:32:45 (permalink)
    #3
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 06:35:46 (permalink)
    0
    Sorry, The image is very small and lost some data when it is converted from BMP to GIF for uploading to the forum.
    Please zoom it to analyse.
     
    Thanks,
    Renjith
    #4
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 06:48:20 (permalink)
    0
    One more thing I forgot to mention.
    The below given is the description about the format of the gnerated C array, which is provided in the Help file of the utility.
    I checked the color table, it is varying from Red to White, 0the index for Red and 0xF index for white.
    But the Raster data is swapped, 0th column is reperesnted Bit0-Bit3 and the 1st column Bit4-7.
    As per the description, it should have like 0th column in Bit4-7, and 1st column data in Bit0-3.
    This is the order of data generated for a 1bit Black/white BMP file looks like.
     
    "Raster Data Encoding 
    Pixels are stored left-to-right, up-to-bottom. Color indices are zero based, meaning a pixel color of 0 represents the first color table entry, a pixel color of 255 (if there are that many) represents the 256th entry. For images with more than 256 colors there is NO color table. "
     
    #5
    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 07:58:08 (permalink)
    0
    Please zoom it to analyse.

    i should re attach bmp zoom does not work

    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #6
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 08:02:33 (permalink)
    0
    Actual BMP is that small, thas why it cant be zoomed in the explorer.
    Could you pls download and open it in MS paint and then zoom ?
    #7
    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 08:13:47 (permalink)
    0
    that worked, the small image shows enough actually i saved gif to bmp and renamed it to gif again to get it attached.
    but i guess this is not reproducable from this one due the save from gif to bmp but i attach it here for example. rename it to bmp

    Attached Image(s)


    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #8
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 08:20:59 (permalink)
    0
    No. the attached one is not the actual image.
    I am unable to attach the BMP as BMP files are not supported to upload in the forum(Im getting error message).
    So I just attached the image to get an idea about the image.
     
    BTW, I use the version
    "Microchip Graphics Library Font & Bitmap Converter 1.60 - November 15, 2008"
     
    To reproduce, If you dont mind,
    I can send you the image in email?
    #9
    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 08:46:14 (permalink)
    0
    Ok i understand, try re-attach the bmp by rename it first to bmp.gif , actual.gif ensure it's size is less then 200K, next this one should be renamed back to bmp.bmp or actual.bmp.

    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #10
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 08:50:56 (permalink)
    0
    Thanks for the tip Smile
     
    I have attached the Bmp file TestBmp4Bit.Bmp.Gif.
    Pls rename it to TestBmp4Bit.Bmp.
     
     

    Attached Image(s)

    #11
    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 09:11:33 (permalink)
    0
    By using Microchip Application Libraries v2009-03-24 and your last attachement renamed that one to bmp
    i get this C contains a few line of contens i didn't use this app before therefore i don't know if this is ok or not.

    Flying With --|Explorer 16|HardWare|SoftWare|-- Fav(s) Gallery Lists
    #12
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 09:29:16 (permalink)
    0
    There is no large char array reperesnting the bitmap data to be displayed??
    Similar to the C file which  I attached in earlier post.
     
     
     
    #13
    Renjith Vamanan
    Senior Member
    • Total Posts : 150
    • Reward points : 0
    • Joined: 2009/05/16 08:57:19
    • Location: India
    • Status: offline
    RE: Bug in Microchip Bitmap and Font converter Utility??? 2009/06/21 16:33:29 (permalink)
    0
    The problem Solved!!
     
    It was my mistake in understanding the format information.
    Raster data bit ordering is not same for 1bit (BW) and 4bit color images.
    For 1bit higher order bit of a byte represents the left most pixel where as least significant 4bits represents left most pixel
    for a 4 bit color image. I misunderstood that bits are stored always from left to right regardless of the number of bits of the image.
     
    Thanks for all the helps...
     
     
     
     
     
    #14
    Jump to:
    © 2019 APG vNext Commercial Version 4.5