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

colorimage operator with binary data

Guest
Jun 30, 2015 Jun 30, 2015

Copy link to clipboard

Copied

Hello,

I have an embedded system with a OpenHCI driver which controls an USB postscript printer.

A Cmos sensor stores raw RGB image data in RAM.

I would like print this images creating a ps file and sent it to the printer.

Colorimage seems the right operator for this issue but it requires data encoded,

for example as ASCII hexadecimal, and this mean a lot of computational costs for my little embedded system.

Is there a way to include binary data to ps file and feed colorimage without encode them ?

Thank you.

TOPICS
Programming

Views

900

Translate

Translate

Report

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
LEGEND ,
Jul 01, 2015 Jul 01, 2015

Copy link to clipboard

Copied

LATEST

colorimage does not REQUIRE encoded data. Are you looking at the PostScript Reference or trying to pick this up from examples?

Some communications channels to printers do not allow binary data. This is not a limitation of colorimage. You will have to study your printer to see if these limitations apply.

If you are concerned about file size (usually the limiting factor), the ASCII85Decode filter is a good choice in this case, because it has a lower overhead than hex. If you are really concerned about the computational costs of generating the data, I don't think you need to be: converting to hex can be extremely computationally cheap, if you avoid calling a routine for each byte and instead fill interim buffers without using formatting routines.

Votes

Translate

Translate

Report

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