🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.postscript.programming
2 messages
2 total messages Started by Chris_Heys Thu, 14 Aug 2008 17:16
raster image to hexadecimal conversion
#162
Author: Chris_Heys
Date: Thu, 14 Aug 2008 17:16
6 lines
810 bytes
Dear People

What's the easiest way of converting a raster image to hexadecimal ?
For example, I might want to turn a 100 X 100 bitmap, 24 bits deep, into a string of 60,000 hex digits.
This, for feeding to the PS colorimage operator.
Thanks in advance.
Re: raster image to hexadecimal conversion
#163
Author: Aandi_Inston
Date: Thu, 14 Aug 2008 17:31
9 lines
1064 bytes
It depends on your programming language and the current form of the
image. I assume you have the uncompressed pixel data, NOT just the
contents of a bitmap file? 

If I were writing in C I use the standard technique of defining a
string of 16 characters for each hex digit, and index it with each
half of each byte in turn.

Aandi Inston
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads