Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

stream image as hex

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott Friedrich - 19 Oct 2005 18:30 GMT
we are upgrading an old COM based app to .net - one thing we need to do is
convert an image to bin-hex and store that as text in a database.  For
example, a bmp in the old app would be converted to something like this.

<SymbolDataStream
0032114D61706775696465204D4C462056312E301022000110A60000000900171102001011227FFF11660001FFFF000111E2FFFE00610000302200183046000000090017
</SymbolDataStream>

we need to duplicate this in .NET.
Any ideas?
Ken Cox [Microsoft MVP] - 20 Oct 2005 04:02 GMT
Hi Scott,

I think the XmlWriter should be able to do that for you. You'll want to look
at the XmlTextWriter.WriteBinHex Method
"Encodes the specified binary bytes as binhex and writes out the resulting
text.

http://msdn2.microsoft.com/en-us/library/fybw7359(en-US,VS.80).aspx

The documentation sample for WriteBase64 should give you the idea at
http://msdn2.microsoft.com/en-us/library/2532kztb

Also, check out the XmlTextWriter.WriteRaw Method

http://msdn2.microsoft.com/en-us/library/3xhh5ey9(en-US,VS.80).aspx

Ken
Microsoft MVP [ASP.NET]

> we are upgrading an old COM based app to .net - one thing we need to do is
> convert an image to bin-hex and store that as text in a database.  For
[quoted text clipped - 6 lines]
> we need to duplicate this in .NET.
> Any ideas?
Scott Friedrich - 20 Oct 2005 15:50 GMT
Ken,

Thanks a ton - I think the XmlTextWriter does the job.

Scott

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.