replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Writing an Image In HEXADECIMAL Format
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Writing an Image In HEXADECIMAL Format

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Mon Apr 21, 2014 8:34 pm    Post subject: Reply with quote

I don't understand 1.

As far as 2. goes, you could try the PSPLOT routines (http://www.nova.edu/ocean/psplot/) OR use Clearwin+ graphics output to a PostScript printer driver, then use Adobe Acrobat. (There are PDF printer drivers that don't need Acrobat - I found 10, including some free ones - on the web).

OR write any sort of graphics file that you can import into MS Word, then save as a PDF (free!).

E
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Mon Apr 21, 2014 9:37 pm    Post subject: Reply with quote

For item 1 you could try %rd[radix=16]. The control can be made read-only if you wish %`rd[radix=16].
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Tue Apr 22, 2014 10:13 am    Post subject: Reply with quote

Paul, It's an image not a value, so it must be a series of bytes, and images are written like that anyway.

If you want to read the data in an image in hexadecimal it isn't a function of how you write it, it's a function of how you read it - you need an editor that displays hex. It's so long ago that I used one I even forgot what it was called, let alone how to use it!

Eddie
Back to top
View user's profile Send private message
brucebowler
Guest





PostPosted: Tue Apr 22, 2014 2:31 pm    Post subject: Reply with quote

I'll start by saying I've got no idea if this will work since I'm not a clearwin person, but if I wanted to write something to a file in hex format, I'd use the Z format descriptor which writes integers as hex.
Back to top
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Wed Apr 30, 2014 11:16 am    Post subject: Reply with quote

Could you give us some more information about your application and the purpose of dumping bitmap as hex?

If you just need to extract some specific bitmap information, then getting the data directly from the WIN32 BITMAP structures is probably the preferred approach.

If you want to create a straight hex dump of the bitmap file, then brucebowler's earlier suggestion is probably the way to go.

LitusSaxonicum wrote:
If you want to read the data in an image in hexadecimal it isn't a function of how you write it, it's a function of how you read it - you need an editor that displays hex. It's so long ago that I used one I even forgot what it was called, let alone how to use it!

No problem, you can use my hexdump utility. Very Happy It's written in a hurry with just few lines of code, so it's not too flashy. PL/I source is included inside the package.

Example output from the start of some bmp-file:
Code:

00000000: 42 4D 36 C1 00 00 00 00  00 00 36 00 00 00 28 00 | BM6.......6...(.
00000010: 00 00 01 01 00 00 40 00  00 00 01 00 18 00 00 00 | ......@.........
00000020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ................
00000030: 00 00 00 00 00 00 FF FF  FF FF FF FF FF FF FF FF | ................
00000040: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000050: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000060: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000070: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000080: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000090: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
000000A0: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
000000B0: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
000000C0: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
000000D0: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
000000E0: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
000000F0: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000100: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000110: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000120: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000130: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000140: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF | ................
00000150: FF FF FF FF FF FF FF FF  FF E4 E4 E4 B3 B3 B3 A5 | ................
...
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Wed Apr 30, 2014 12:41 pm    Post subject: Reply with quote

Plato can display files in binary form. Just click Open on the File menu and use the appropriate check box.
Back to top
View user's profile Send private message AIM Address
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Wed Apr 30, 2014 3:59 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
Plato can display files in binary form. Just click Open on the File menu and use the appropriate check box.

I had missed that option. It is not available, if you use toolbar button instead of a menuitem for opening file.

I have mapped my hexdump utility as a Plato command and it works quite nicely.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group