[softwarelist] with TIFF preview (Ovation Pro for RISC OS)

  • From: P C Newble <peter@xxxxxxxxxx>
  • To: <davidpilling@xxxxxxxxxxxxx>
  • Date: Fri, 26 Jan 2007 05:17:16 +0000 (GMT)

> In article <lvjF9oDITPuFFwJ5@xxxxxxxxxxxxxxxxxxx>, David
> Pilling <flist@xxxxxxxxxxxxxxxxxxx> wrote:
> > This is a new applet that gives you the chance to generate
> > your own preview for an EPS file.

> > I've not tried using GhostScript with it...

In article <4eaae88bd3peter@xxxxxxxxxx>, P C Newble
<peter@xxxxxxxxxx> wrote:
> I must be missing something obvious here, but I've not had
> much success yet. . . .

Grovelling apologies -- I've cracked it and I /had/
misunderstood. I had been trying to import an EPS file just by
dragging into an empty frame in the normal way. That still uses
the supplied TIFF preview or none at all, as before. I hadn't
realised that you need to shift-drag the EPS into an existing
empty frame, as if creating a proxy from the start for any other
kind of image file, then tick the 'Proxy' and 'Reference' boxes
in the normal way (except that the options in the menu alongside
have no effect, of course). /Then/ eps_makeproxy() is called.
Having got this far, I had more problems with eps_makeproxy still
not being called until I realised that 'Reference' /must/ be
selected as well as 'Proxy'.

Having established that, I would suggest the following definition
for eps_makeproxy() in !OEPS.Library.!EPSCode:

int eps_makeproxy(string & name,string & preview,int x0,int
y0,int x1,int y1,string & to)
{

 return(osclis("wimptask <GhostScript$Dir>.gs -q -dBATCH
-dNOPAUSE -sOutputFile="+to+" -sDEVICE=spr -r150 -dEPSCrop
"+name));
}

(where -r150 gives an output resolution of 150dpi)

Mostly this seems to work, but I have run into (apparently)
memory-related problems when an EPS which GhostScript succesfully
converts without error in a taskwindow seems to fail to produce a
proxy image in Ovation Pro. Also, once an EPS has been attempted
which GhostScript doesn't like, it the conversion process then
fails consistently until the machine is reset.

I need to extend this function a bit to include a yes/no
confirmation box confirming that the EPS includes a preview, and
asking whether to use it. Of course an unreferenced image with a
TIFF preview can be created just by dragging the file into a
frame but, as soon as you decide to reference the image,
eps_makeproxy is used, so as it stands a referenced image using
the TIFF preview isn't possible.

More elaborate would be a dialogue box to allow the proxy
resolution and type to be chosen, but I haven't done anything
that elaborate as an Ovation Pro script before . . .


Other related posts: