Redeye removal, cropping, marching ants and maximum image size.
Brian Yennie
briany at qldlearning.com
Fri Apr 2 17:52:12 EST 2004
> 1) Is anyone doing redeye removal in Rev? If so, would you mind
> sharing how you are doing it?
I'm guessing the question here is going to be speed. If someone can
find reference to the algorithm for this, it could be done with
imageData, but it might be slow. Perhaps one of the GNU image
manipulating libraries out there does this? If so, you could probably
get binary versions and use shell() to manipulate files on disk?
Barring either of those, it sounds like external territory.
> 2) Real time image cropping. I seem to remember someone posting code
> showing how to do cropping in real time, i.e. drag mouse and have
> inner rect shows at 100% blendLevel and outer rect shows at 50%
> blendLevel. Did anyone happen to save the snippet?
It looks like this thread is related...
http://lists.runrev.com/pipermail/use-revolution/2003-August/021551.html
You might try searching the archives for everything to do with "crop"-
just go to google and add "site:lists.runrev.com" to your query.
With that said, you should be able to do something roughly like:
global isCropping
on mouseDown
put TRUE into isCropping
put the mouseLoc into startCorner
show fld "translucent"
end mouseDown
on mouseUp
put FALSE into isCropping
crop this image to the rect of image "translucent"
hide fld "translucent"
end mouseUp
on mouseMove x,y
## NOTE: this will only drag down and to the right, need some more
logic here
if (isCropping = TRUE) then
set the rect of fld "translucent" to (startCorner&x&comma&y)
end if
end mouseMove
> 3) In Photoshop, MacPaint, even the RR IDE, when you select a
> rectangle it shows "marching ants" around the selection. Is there any
> way to get this effect in RR? Is there a "marching ants" command I'm
> overlooking?
Try creating a rectangle and giving it a script like:
on startMarching
send "changePattern" to me in 250 milliseconds
set the patternMsgID of me to it
end startMarching
on stopMarching
cancel (the patternMsgID of me)
end stopMarching
on changePattern
## alternate the foreground pattern between even and odd "ant"
patterns
end changePattern
> 4) What's the max image size? Is it something like 2000 x 2000? I've
> got some panoramas I'm trying to scale, and they're all coming out
> unusable (but at least it doesn't seem to crash when this happens).
I believe so. I wonder... would it be useful to write a plugin that
takes a very large image, tiles it, and then imports the tiles grouped
together? That might be handy to some, even for images that don't
exceed the maximum...
- Brian
More information about the use-livecode
mailing list