Kendall Anderson wrote:

> 'crop a pure
> rectangle' method (AutoCropper) took 1.28s, and using the 'return an
> image with only the different pixels and lots of white space' method
> took 0.42s.

not quite clear about the context here, but are they huge images?

I ran a quick test using a 1024x512 jpg, and the undocced (in D7)
crop function.

the following method gives you the kind of image that you like, ie trimmed
whitespace, and also retains the regPoint so you can drop the resulting
image straight on to the score.


--<lingo>--

on cropThis theMember, cropRect
  tim = the milliseconds
  duplicate theMember
  newMember = member( the result )
  crop(newMember, cropRect)
  put "time:" && the milliseconds - tim && "milliseconds"
  return newMember
end

--</lingo>--


Message Window

put cropThis( member("image"), rect(10,10,250,300) )
-- "time: 53 milliseconds"
-- (member 26 of castLib 1)


I don't know what scripting you are using, or what size images you're
cropping... but hope it's of some use...

Christian


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to