Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert Hex value into a BMP Image in Visual Basic

Posted on 2004-04-13
3
Medium Priority
?
1,607 Views
Last Modified: 2010-05-18
Hi ALL

Can any body give me a solution(a kind of wrapper function) on converting a hex value into a BMP image.

My actual problem is , I have a table in the database in which one column contains Hexadecimal value. I need to take that Hexadecimal value and convert it into a BitMap Image.

Example hexadecimal value looks like this:
00481C017FFFFF0000000000007FFFFF0000000000007FFFFF0000000000007FFFFF0000000000007FFFFF0000000000007FFFBE0000000000003FFEAE0000000000001DF4AE00000000000014E00200078000003C100002000483F80024100002007C824F80243F00F3F0C4F3CCF82461831B199C9FCCCFFCC0C60E09344CCCF9308068066924CCCCF890803806CD34CCCC9990803006E59CCCCC9990FFFFFC24C4CFCC99904CD8C4EC7CC8

0
Comment
Question by:sidduexpert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
Kavar earned 400 total points
ID: 10813335
its raw hex string....
create a file, write a character for each 2 letters represented in hex....

for i=0 to len(whatstring) step 2
char2=mid(whatstring,i,2)
toWrite= int(hex("&H" & char2)
print #1,char2 || outputfile.write char2
next

make sure you save the file as .bmp
you can then use LoadImage or whatever to view it, you could do it with pointers and RTLCopymemory, but this is way easier

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Make the most of your online learning experience.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question