From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA11563; Wed, 12 Jun 2002 20:09:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA11435 for ; Wed, 12 Jun 2002 20:09:06 +0200 (MET DST) Received: from gato.phys.clemson.edu (gato.phys.clemson.edu [130.127.188.133]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g5CI94j09065; Wed, 12 Jun 2002 20:09:04 +0200 (MET DST) Received: from adsl-33-208-98.gsp.bellsouth.net ([67.33.208.98] helo=elefante.local) by gato.phys.clemson.edu with asmtp (Exim 3.35 #1 (Debian)) id 17IGIZ-0000mQ-00; Wed, 12 Jun 2002 18:09:03 -0400 Received: from oso.local ([192.168.1.3]) by elefante.local with esmtp (Exim 3.35 #1 (Debian)) id 17ICYG-0000Wh-00; Wed, 12 Jun 2002 14:09:00 -0400 Received: from fernando by oso.local with local (Exim 3.35 #1 (Debian)) id 17IGIY-0003Ul-00; Wed, 12 Jun 2002 18:09:02 -0400 Date: Wed, 12 Jun 2002 18:09:02 -0400 To: caml-list@inria.fr Cc: xavier.leroy@inria.fr, info@gerd-stolpmann.de, "Jun P.FURUSE" Subject: Re: [Caml-list] camlimages and kernel memory Message-ID: <20020612220902.GB13193@oso.local> References: <20020605234852.GA4103@oso.local> <20020606230826.C616@ice.gerd-stolpmann.de> <20020608153614.A12902@pauillac.inria.fr> <20020612.182037.700403668.Jun.Furuse@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020612.182037.700403668.Jun.Furuse@inria.fr> User-Agent: Mutt/1.3.28i From: Fernando Alegre Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thank you for all the good suggestions. We are currently using Bigarrays and mmap to read images from files, simulating the dcams. We map the whole file into a bigarray and use ad-hoc functions to extract the rgb data without worriying much about headers. This is OK for now, but we may be interested in the future in interfacing with the camlimages library. So, the next question is: Can we use Obj.magic to convert a bigarray to a string without copying data? Will this trick work with boundary checks turned off, so that we can have the advantage of mmap and no bound checks at the same time? Thanks again, Fernando Alegre On Wed, Jun 12, 2002 at 06:20:37PM +0200, Jun P.FURUSE wrote: > The kernel memory may use different pixel layout, I am afraid. > In such case, you have to write your own version of module like > Rgb24, Index8 and so on. I am sorry but they are not well documented... > BTW, once I tried to implement Image.t using Bigarray, but it was too > slow. It seemed to me that it performed the array boundary checks for > each access. For image manipulation purposes, the unsafe versions of set > and get are really required. ------------------- 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