Once again a client asked for some help with image editing in FileMaker. An imported picture should be scaled to a given size and than be cropped to a round image. Of course there are no round images, just images with alpha channels to give the illusion the image may be round.

We created the following example script to first read in the image from a container field. We create a temporary image with transparent background of the source size and composite the existing image into that. Next we scale it to the requested size.

Next we create a new image where we draw the cirlce for the mask and we apply this mask to the scaled down image. Next we compose this image into our final image to apply the mask and write it to a container as PNG image file: