[Haskell-cafe] Re: [Haskell] Image manipulation
Stefan O'Rear
stefanor at cox.net
Mon Oct 29 21:25:25 EDT 2007
On Mon, Oct 29, 2007 at 02:39:58PM -0700, Tim Chevalier wrote:
> [redirecting to haskell-cafe]
> On 10/29/07, Brent Yorgey <byorgey at gmail.com> wrote:
> > Haskell is a wonderful language, so I hate to say this...but personally I
> > don't see the benefit of using Haskell here, unless the manipulations you
> > want to do are very complex. Some simple shell (or
> > perl/python/ruby/whatever) scripts to glue together some calls to convert
> > (or possibly other ImageMagick utilities) ought to do the job just fine.
> >
>
> If you're doing many image transformations, invoking an external
> program like convert will get expensive due to context-switching. So
> that's why something like the (not-yet-existent) bindings for
> ImageMagick-as-a-library might be useful.
>
> I agree that laziness probably isn't going to be helpful, but there
> may be interesting things to be done that are enabled by purity and
> higher-order-functions. I'm working on the ImageMagick bindings
> because I'm curious to find out. There are obvious things like being
> able to define compositions of transformations -- which is easy to do
> when you're calling library functions in-memory, and less so if you're
> using a separate executable -- but maybe there are more interesting
> applications too.
The OP specified that the images are around 5M in size, and need to be
rescaled, so we're talking about quite a bit of computation per shellout
(tens to hundreds of megacycles). Are context switches that slow?
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20071029/ee2253fa/attachment.bin
More information about the Haskell-Cafe
mailing list