Solved

Convert Hex value into a BMP Image in Visual Basic

Posted on 2004-04-13
3
1,578 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 100 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Progress

617 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