Skip to main content
Participant
August 14, 2008
Question

raster image to hexadecimal conversion

  • August 14, 2008
  • 1 reply
  • 681 views
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.
This topic has been closed for replies.

1 reply

Participating Frequently
August 14, 2008
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