caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Displaying Postscript?
@ 2003-01-25 10:16 Robert Morelli
  2003-01-27 10:57 ` Didier Le Botlan
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Robert Morelli @ 2003-01-25 10:16 UTC (permalink / raw)
  To: caml-list

I'm working on an OCaml application which I'd like 
to do the following:  load an existing postscript 
file from disk, launch a window in which the 
document is displayed,  and allow the user to select a
rectangle on a page of the document using the mouse
(and of course have access to the bounds of the rectangle
within the application).  What libraries/tools are 
available to do such a thing?

Thanks






-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-25 10:16 [Caml-list] Displaying Postscript? Robert Morelli
@ 2003-01-27 10:57 ` Didier Le Botlan
  2003-01-30  7:52   ` Florian Hars
  2003-01-28 10:43 ` Jun P. FURUSE
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Didier Le Botlan @ 2003-01-27 10:57 UTC (permalink / raw)
  To: Robert Morelli; +Cc: caml-list

Robert Morelli wrote:
> I'm working on an OCaml application which I'd like 
> to do the following:  load an existing postscript 
> file from disk, launch a window in which the 
> document is displayed,  and allow the user to select a
> rectangle on a page of the document using the mouse
> (and of course have access to the bounds of the rectangle
> within the application).  What libraries/tools are 
> available to do such a thing?

I once wrote a program which only displayed postscript, and I used 
ghostscript. That is, my program calls Unix.open_process_out, with the 
expected arguments. This is not handy at all, since interfacing with 
ghostscript is painful, but I do not know any better solution.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-25 10:16 [Caml-list] Displaying Postscript? Robert Morelli
  2003-01-27 10:57 ` Didier Le Botlan
@ 2003-01-28 10:43 ` Jun P. FURUSE
  2003-01-28 12:04   ` Sven Luther
  2003-01-29  9:05 ` Sven Luther
  2003-01-29 10:06 ` Oleg
  3 siblings, 1 reply; 11+ messages in thread
From: Jun P. FURUSE @ 2003-01-28 10:43 UTC (permalink / raw)
  To: morelli; +Cc: caml-list

Hello,

> I'm working on an OCaml application which I'd like 
> to do the following:  load an existing postscript 
> file from disk, launch a window in which the 
> document is displayed,  and allow the user to select a
> rectangle on a page of the document using the mouse
> (and of course have access to the bounds of the rectangle
> within the application).  What libraries/tools are 
> available to do such a thing?

One possibility is a combination of LablGtk and Camlimages 
LablGtk provides a GUI and Camlimages is for image file manipulation.

Maybe you can also use gdkpixbuf interface of LablGtk instead of 
Camlimages, but I am not really sure.

	LablGtk: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk/
	Camlimages: http://pauillac.inria.fr/camlimages/

-----------------------------------------------------------------------
Jun P. Furuse 					 Jun.Furuse@inria.fr


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-28 10:43 ` Jun P. FURUSE
@ 2003-01-28 12:04   ` Sven Luther
  2003-01-28 12:48     ` Jun P. FURUSE
  0 siblings, 1 reply; 11+ messages in thread
From: Sven Luther @ 2003-01-28 12:04 UTC (permalink / raw)
  To: Jun P. FURUSE; +Cc: morelli, caml-list

On Tue, Jan 28, 2003 at 11:43:59AM +0100, Jun P. FURUSE wrote:
> Hello,
> 
> > I'm working on an OCaml application which I'd like 
> > to do the following:  load an existing postscript 
> > file from disk, launch a window in which the 
> > document is displayed,  and allow the user to select a
> > rectangle on a page of the document using the mouse
> > (and of course have access to the bounds of the rectangle
> > within the application).  What libraries/tools are 
> > available to do such a thing?
> 
> One possibility is a combination of LablGtk and Camlimages 
> LablGtk provides a GUI and Camlimages is for image file manipulation.
> 
> Maybe you can also use gdkpixbuf interface of LablGtk instead of 
> Camlimages, but I am not really sure.

BTW, have you tested camlimages with the (alpha) lablgtk2 ?

And is it still possible to build camlimages with libpng 2 ?

Friendly,

Sven Luther
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-28 12:04   ` Sven Luther
@ 2003-01-28 12:48     ` Jun P. FURUSE
  2003-01-28 14:32       ` Sven Luther
  0 siblings, 1 reply; 11+ messages in thread
From: Jun P. FURUSE @ 2003-01-28 12:48 UTC (permalink / raw)
  To: luther; +Cc: morelli, caml-list

Hello,

> > One possibility is a combination of LablGtk and Camlimages 
> > LablGtk provides a GUI and Camlimages is for image file manipulation.
> > 
> > Maybe you can also use gdkpixbuf interface of LablGtk instead of 
> > Camlimages, but I am not really sure.
> 
> BTW, have you tested camlimages with the (alpha) lablgtk2 ?

Nope. Do you need it ?
 
> And is it still possible to build camlimages with libpng 2 ?
 
Yes, I still use libpng2-dev.

-
Jun
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-28 12:48     ` Jun P. FURUSE
@ 2003-01-28 14:32       ` Sven Luther
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Luther @ 2003-01-28 14:32 UTC (permalink / raw)
  To: Jun P. FURUSE; +Cc: luther, morelli, caml-list

On Tue, Jan 28, 2003 at 01:48:32PM +0100, Jun P. FURUSE wrote:
> Hello,
> 
> > > One possibility is a combination of LablGtk and Camlimages 
> > > LablGtk provides a GUI and Camlimages is for image file manipulation.
> > > 
> > > Maybe you can also use gdkpixbuf interface of LablGtk instead of 
> > > Camlimages, but I am not really sure.
> > 
> > BTW, have you tested camlimages with the (alpha) lablgtk2 ?
> 
> Nope. Do you need it ?
>  
> > And is it still possible to build camlimages with libpng 2 ?
>  
> Yes, I still use libpng2-dev.

Well, the thing is, in debian, gnome 1 packages are linked against
libpng2, and gnome2 (including gtk2) packages are linked against
libpng3 (well, libpng12-0 actually). And you cannot have the devel
environment for both libpngs installed at the same time. Stefano builds
his camlimages with libpng3 though, and it uses the lablgtk packages. In
turn, lablgtk depends on libgtkxmhtml-dev, which depends on libpng2. I
thought that the correct way would be to have two camlimages, one which
uses lablgtk and libpng2, and the other which uses lablgtk2 and libpng3.

I am not sure, but mixing both libpngs in a same executable may cause
problems, maybe ...

Friendly,

Sven Luther
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-25 10:16 [Caml-list] Displaying Postscript? Robert Morelli
  2003-01-27 10:57 ` Didier Le Botlan
  2003-01-28 10:43 ` Jun P. FURUSE
@ 2003-01-29  9:05 ` Sven Luther
  2003-01-29 10:06 ` Oleg
  3 siblings, 0 replies; 11+ messages in thread
From: Sven Luther @ 2003-01-29  9:05 UTC (permalink / raw)
  To: Robert Morelli; +Cc: caml-list

On Sat, Jan 25, 2003 at 03:16:50AM -0700, Robert Morelli wrote:
> I'm working on an OCaml application which I'd like 
> to do the following:  load an existing postscript 
> file from disk, launch a window in which the 
> document is displayed,  and allow the user to select a
> rectangle on a page of the document using the mouse
> (and of course have access to the bounds of the rectangle
> within the application).  What libraries/tools are 
> available to do such a thing?

Notice that i believe advi has some code doing just that, since it is
able to display the postscript includeded by a .dvi file.

Friendly,

Sven Luther
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-25 10:16 [Caml-list] Displaying Postscript? Robert Morelli
                   ` (2 preceding siblings ...)
  2003-01-29  9:05 ` Sven Luther
@ 2003-01-29 10:06 ` Oleg
  2003-01-29 11:00   ` Mike Potanin
  3 siblings, 1 reply; 11+ messages in thread
From: Oleg @ 2003-01-29 10:06 UTC (permalink / raw)
  To: Robert Morelli, caml-list

On Saturday 25 January 2003 05:16 am, Robert Morelli wrote:
> I'm working on an OCaml application which I'd like
> to do the following:  load an existing postscript
> file from disk, launch a window in which the
> document is displayed,  and allow the user to select a
> rectangle on a page of the document using the mouse
> (and of course have access to the bounds of the rectangle
> within the application).  

gv student_seminar.ps & sleep 3; import output.png

Wait until the mouse pointer changes shape before selecting the rectangle
"import" is part of imagemagick package (there is also libmagick you might 
like)

HTH
Oleg

> What libraries/tools are
> available to do such a thing?
>
> Thanks
>
>
>
>
>
>
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives:
> http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
> http://caml.inria.fr/FAQ/ Beginner's list:
> http://groups.yahoo.com/group/ocaml_beginners

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-29 10:06 ` Oleg
@ 2003-01-29 11:00   ` Mike Potanin
  2003-01-29 19:23     ` Oleg
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Potanin @ 2003-01-29 11:00 UTC (permalink / raw)
  To: Oleg; +Cc: Robert Morelli, caml-list

On Wed, 29 Jan 2003, Oleg wrote:

> On Saturday 25 January 2003 05:16 am, Robert Morelli wrote:
>
> gv student_seminar.ps & sleep 3; import output.png
gs -q -dNOPAUSE -sDEVICE=png256 -sOutputFile=output.png student_seminar.ps
</dev/null
It is more right, IMHO.
>
> Wait until the mouse pointer changes shape before selecting the rectangle
> "import" is part of imagemagick package (there is also libmagick you might
> like)
>
> HTH
> Oleg
>
> > What libraries/tools are
> > available to do such a thing?
> >
> > Thanks
> >
> >
> >
> >
> >
> >
> > -------------------
> > To unsubscribe, mail caml-list-request@inria.fr Archives:
> > http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
> > http://caml.inria.fr/FAQ/ Beginner's list:
> > http://groups.yahoo.com/group/ocaml_beginners
>
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-29 11:00   ` Mike Potanin
@ 2003-01-29 19:23     ` Oleg
  0 siblings, 0 replies; 11+ messages in thread
From: Oleg @ 2003-01-29 19:23 UTC (permalink / raw)
  To: Mike Potanin; +Cc: Robert Morelli, caml-list

On Wednesday 29 January 2003 06:00 am, Mike Potanin wrote:
> > gv student_seminar.ps & sleep 3; import output.png
>
> gs -q -dNOPAUSE -sDEVICE=png256 -sOutputFile=output.png student_seminar.ps
> </dev/null
> It is more right, IMHO.

But it doesn't do anything the OP wanted, does it? He wanted to display PS 
interactively and select rectangles with the mouse.

Cheers,
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] Displaying Postscript?
  2003-01-27 10:57 ` Didier Le Botlan
@ 2003-01-30  7:52   ` Florian Hars
  0 siblings, 0 replies; 11+ messages in thread
From: Florian Hars @ 2003-01-30  7:52 UTC (permalink / raw)
  To: Didier Le Botlan; +Cc: Robert Morelli, caml-list

Didier Le Botlan wrote:
> I once wrote a program which only displayed postscript, and I used 
> ghostscript. That is, my program calls Unix.open_process_out, with the 
> expected arguments.

Another alternative might be to try to interface with the ghostscript 
interpreter API:

http://www.cs.wisc.edu/~ghost/doc/cvs/API.htm
(or http://www.cs.wisc.edu/~ghost/doc/gnu/7.05/API.htm if you want it unter the 
GPL).

Yours, Florian.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-01-30  7:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-25 10:16 [Caml-list] Displaying Postscript? Robert Morelli
2003-01-27 10:57 ` Didier Le Botlan
2003-01-30  7:52   ` Florian Hars
2003-01-28 10:43 ` Jun P. FURUSE
2003-01-28 12:04   ` Sven Luther
2003-01-28 12:48     ` Jun P. FURUSE
2003-01-28 14:32       ` Sven Luther
2003-01-29  9:05 ` Sven Luther
2003-01-29 10:06 ` Oleg
2003-01-29 11:00   ` Mike Potanin
2003-01-29 19:23     ` Oleg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).