Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Helge Blischke Newsgroups: comp.lang.postscript Subject: Re: How to integrate a graphic (jpg) in a postscript file Followup-To: comp.lang.postscript Date: Mon, 02 Jul 2012 19:11:59 +0200 Lines: 60 Message-ID: References: <87fw9bqfhy.fsf@Compaq.site> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Trace: individual.net tbIDBoDIEoCfUj5W3eSangdtlCiNLrM95rAMxm80oeBdT/1Q7J5KTEwgntOEgd0zg8 Cancel-Lock: sha1:fA4DRy2PGeUVGOwXKoNxOaKYk2g= User-Agent: KNode/0.99.01 Xref: csiph.com comp.lang.postscript:776 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--------------------