VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345678[9]10 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 14:44:55 12/04/00 Mon
Author: Marcel
Subject: Re: EPS Graphic Support
In reply to: Marcel 's message, "Re: EPS Graphic Support" on 07:47:23 12/04/00 Mon

Hi Michel,

Thanks for the info. Looks like a good idea. I'll give it a try.

Regards,
Marcel

>
> Hi Marcel,
>
> The EPS format is a very complicated format since it
> is a postscript format requiring a posscript
> interpreter. I do not have plans to support it. An
> Envision user has contributed some code though, which
> allows viewing an EPS preview. Many EPS files under
> Windows have a tiff or wmf preview inside the EPS
> file. I don't plan to support this directly, but you
> want to try it out:
>
> (*
> 0-3 Must be hex C5D0D3C6 (byte 0=C5).
> 4-7 Byte position in file for start of PostScript
> language code section.
> 8-11 Byte length of PostScript language section.
> 12-15 Byte position in file for start of Metafile
> screen representation.
> 16-19 Byte length of Metafile section (PSize).
> 20-23 Byte position of TIFF representation.
> 24-27 Byte length of TIFF section.
> *)
>
> type
> TEPSFHeader = record
> Signature,
> PSStart,
> PSLengh,
> WMFStart,
> WMFLength,
> TIFFStart,
> TIFFLength : Cardinal;
> end;
>
> function LoadEPSFromStream(st : TStream) : TGraphic;
> var
> hdr : TEPSFHeader;
> ms : TMemoryStream;
> start,
> count : integer;
> begin
> result := NIL;
> st.Seek(0, soFromBeginning);
> st.ReadBuffer(hdr, SizeOf(hdr));
> if hdr.Signature <> $C6D3D0C5 then
> raise EInvalidGraphic.Create('EPS has no screen
> representation');
> if hdr.TIFFLength > 0 then begin
> start := hdr.TIFFStart;
> count := hdr.TIFFLength;
> result := TTiffGraphic.Create;
> end else if hdr.WMFLength > 0 then begin
> start := hdr.WMFStart;
> count := hdr.WMFLength;
> result := TMetaFile.Create;
> end else
> raise EInvalidGraphic.Create('EPS has no screen
> representation');
> ms := TMemoryStream.Create;
> try
> ms.SetSize(count);
> st.Seek(start, soFromBeginning);
> if ms.CopyFrom(st, count) <> count then
> raise EInvalidGraphic.Create('TIFF screen
> representation invalid');
> ms.Seek(0, soFromBeginning);
> result.LoadFromStream(ms);
> finally
> ms.free;
> end;
> end;
>
>
> For other formats, there are not any short term plans,
> but I may consider MNG (multiple image png), FlashPix,
> and JBIG.
>
> Best regards,
>
> Michel
>
> > Hi,
> >
> > We're currently using envision in a product of ours
> > and one of our clients has requested support for EPS
> > graphics. Does envision plan on supporting EPS
> > graphics? Also what other formats does envision plan
> > to support in the future?
> >
> > Regards
> > Marcel

[ Next Thread | Previous Thread | Next Message | Previous Message ]

[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.