Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

raster image to hexadecimal conversion

New Here ,
Aug 14, 2008 Aug 14, 2008
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.
TOPICS
Programming
623
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 14, 2008 Aug 14, 2008
LATEST
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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines