3 Replies Latest reply on Dec 5, 2012 12:23 PM by Stephen Huston

    Resizing images in a container




      I designed an audit report for an iPad or iPhone which bascially asks a number of questions and then captures to image via the camera into two containers. I have also set up a script on a button which then creates a PDF of the audit and emails this to a set email address.


      The problem is the images blow out the size of my pdf to around 3MB's or more.


      I would like help updated my script to automatically resize the images when it generates the .pdf (I think i need to use "Getthumbnail" function) I just need the image to be under 150kbs and no biger than 640x480 pixels - I'm trying to keep the .pdf under 600kbs


      Email Audit Script.jpg


      or.. a script that automatically re-sizes the images when they are captures in the container. The containers on the form are called "Photo1" and "Photo2"



        • 1. Re: Resizing images in a container

          CNS makes a plugin that will resize pictures.  But if you use the FileMaker Inspector in the layout mode, you can tell the picture to resize to the object size in the layout and that will probably take care of it for you. 

          • 2. Re: Resizing images in a container



            Under data formatting I have set this to "reduce or enlarge image to fit"  and the containers are only small. This however seems to have no effect over resolution of the image and hences still a large file.


            If I sent the audit without any images the size is only 112kb, and with two images its 3mb

            • 3. Re: Resizing images in a container
              Stephen Huston

              Using the new container-functions and scripting, you can SET another container's content to be a specific size using a script and the container sizing function. This can give you the optimised image size you want on any record from any size of source image. Use the second container in your output, and your PDFs will always use the same size.


              Dig into the new functions in the calc engine for containers, and script the Set Field process to use these new calc values to create the size image you want in the second container field.