Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #776

Re: How to integrate a graphic (jpg) in a postscript file

From Helge Blischke <h.blischke@acm.org>
Newsgroups comp.lang.postscript
Subject Re: How to integrate a graphic (jpg) in a postscript file
Followup-To comp.lang.postscript
Date 2012-07-02 19:11 +0200
Message-ID <a5e330Fpf3U1@mid.individual.net> (permalink)
References <87fw9bqfhy.fsf@Compaq.site>

Followups directed to: comp.lang.postscript

Show all headers | View raw


Cecil Westerhof wrote:

> I want to include an image (jpeg) into my postscript file. Until know
> I only found a kind of hex-dump into the postscript file. Is there a
> (preferable) simple method to include a (changing) graphic into a
> postscript file?
> 

I have a set of PostScript procedures to render - among others - JPEG 
images; see the following description. Drop me an e-mail if this is an
option for you.

Helge

-----------------------------snip-----------------------------------
% Description
% -----------
%       This procset adds basic support of baseline JPEG streams suppled as
%       separate files to tiffifd and tiffimg, respectively, according to
%       the Technote TTN 2 by Adobe.
%
%       Image files starting with 0xffd8 (JPEG SOI marker) are interpreted as
%       JPEG streams.
%       The following markers are interpreted:
%       APP0  JFIF
%               ResolutionUnit, XResolution, and Yresolution are extracted;
%               the thumbnail information, if present, is skipped.
%       APP0  JFXX
%               is only treated as a valid marker, the contents is skipped.
%       APP13 Photoshop:
%               If present, color values are inverted; the rest of this marker
%               is skipped.
%       APP14 Adobe
%               Used to determine the ColorTransform parameter for the
%               DCTDecode filter.
%       SOFn (n = 0, 1, 3)
%               Used to extract the image dimensions, number of colors,
%               and to do an educated guess on ColorTransform it the
%               Adobe marker has not been found.
%
%       The header interpretation stops with the first SOF marker found.
%
% Requirements:
% -------------
%       tiffifd 1.2 3   or higher
%       tiffimg 1.1 4   or higher
%
% Restrictions:
% -------------
%       Currently, stripped or tiled JPEG streams are not supported. The
%       whole image file is treated as a single strip with respect to the TIFF
%       conventions, and we rely on the JPEG stream as a whole being
%       compatible with the PostScript DCTDEcode filter.
%       Only some basic compatibility checks are performed
%       (8 bits per sample, 1, 3, or 4 samples per pixel).
%       The color spaces supported are DeviceGray, DeviceRGB, and DeviceCMYK;
%       but see the remarks on ColorTransform above.

--------------------snip--------------------

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to integrate a graphic (jpg) in a postscript file Cecil Westerhof <Cecil@decebal.nl> - 2012-07-02 00:32 +0200
  Re: How to integrate a graphic (jpg) in a postscript file Mark Carroll <mtbc@bcs.org> - 2012-07-01 18:46 -0400
    Re: How to integrate a graphic (jpg) in a postscript file ken <ken@spamcop.net> - 2012-07-02 08:00 +0100
  Re: How to integrate a graphic (jpg) in a postscript file Helge Blischke <h.blischke@acm.org> - 2012-07-02 19:11 +0200
  Re: How to integrate a graphic (jpg) in a postscript file Don Lancaster <don@tinaja.com> - 2012-07-12 18:18 -0700

csiph-web