Image Cropping Tool for Livecode

Wilhelm Sanke sanke at hrz.uni-kassel.de
Mon Dec 5 12:20:30 EST 2011


On Mon Dec 5, 2011, Alejandro Tejada capellan2000 at gmail.com wrote:


> Some years ago, I created this stack:
> Mask bitmap 02
> http://andregarzia.on-rev.com/alejandro/stacks/mask_bitmap02.zip
> (snip)
>  The bitmap image should be completely visible in
> the card. If the image is bigger than the card, then
> the script of this palette will not work as expected.
>
> I am sure that Wilhelm Sanke have worked extensively
> on this same topic and the code that you need is
> in one of his stacks.
>
> Al


What Alejandro had in mind was probably my (also old) stack "More about 
Masks"

<http://www.sanke.org/Software/MoreAboutMasksRev3.zip>.

The stack was put together with the cooperation of Jim Hurley and Bernd 
Niggemann. It explores and discusses in detail different approaches to 
crop images.

On card 3 "mask images as selection tools" you may find what you need. 
The source image can be any size, also bigger than the card.

There are 11 masks on that page (among them different ovals, 
rounded-rect, triangle, semicircle, star etc.) which can be resized in 
any direction and put anywhere on the image.-

I have got another stack "Photo Patchworks", which is however not yet 
publicly released and has some different features:

- you choose one of the masks, which you can place on the image and resize
- you select a transparency mode for the edges of the selection (if 
intended for seamless blending)
- then you select a resizing mode (enlarge, no change, shrink) for the 
selected patch and the rate of resizing
- after that you move the produced new part of the image to the location 
on the image where you want to embed it
- finally you set the blendlevel for the image part to be embedded.
- And more, after all that you are asked if you intend to use the 
cropped part of the image to be placed another time at a different spot 
on the image.

The cropped patch can be also placed on a another image and the patches 
itself can be flipped, rotated, and modified in still other ways.

As an example for the possibilities of the stack I had produced sort of 
a caricature out of an image of G.W. Bush (two/three years ago?). The 
image is still there on my website, but it is only accessible if you 
know the exact URL.
However, some of the members of this list had felt offended then (my 
thinking had been that Bush as a public figure could be modified in such 
a way as it is usually the practice in newspapers and other media), so 
you can assume that this was one the reasons to not release the stack, 
because I did not want to interfere with U.S.-politics.

If, however, someone has the urgent need to produce caricatures of  
Tea-Party members or - maybe less likely - of candidates of the other 
grand party, let me know that off-list.

The Photo Patchworks stack is compatible with any party.

Regards,

Wilhelm Sanke




More information about the use-livecode mailing list