Cropping images

Perhaps this should be in feature requests, but I have a need to programmatically crop out portions of images (from a user table) for display in an html field. I thought that the Images plug-in might do this but it doesn’t seem to have this functionality.

Does anyone know of a tool out there that can do this within the Servoy environment? Or any other trick that could be used to display only a portion of an image (with the number of top, bottom, left, and right pixels to be eliminated specified programmatically) in an html field?

Any plans by Servoy to add this functionality to the Images plug-in?

I haven’t tested it yet… but you could try this… var myimage = plugins.imagefx.cropImage(imagedata, top, left, bottom, right);

imagefx.jar (30.1 KB)

Thanks, Fred!

Works like a charm!

What a great forum…

That’s good to hear :)

I added the source files to the jar also, just in case you want to make changes or add stuff.

Best of luck,
Fred

Hi Fred,

maybe it’s handy to contact Robert Ivens (Roclasi) to put it on ServoyForge?