![]() CNS ImageImport, edit, and export images in the FileMaker environment.
|
|
Features
|
Possible Uses
|
The following is a list of all available functions and a complete description of each. For general information on how the External functions work and how you can use them in your calculations, please see the How to use Plug-ins PDF Document available on the CNS Plug-ins website.
CNS Image can import images into container fields and export images from container fields. What the plug-in can do with images while in FileMaker is where it gets interesting.
Imagine importing a folder of digital photos into FileMaker. There are several tasks you will probably want to apply to your photos. You may want to rotate a photo from landscape to portrait. You may want to crop a photo down to capture the subject of the photo better. You may want to flip or reflect a photo horizontally, vertically, or both. You may want to apply a sepia color tint to the photo to give it that antique look. You may want to sharpen the photo up and adjust the hue or saturation of the photo to make the colors pop out better. You may want to extract a layer from a Photoshop or PDF document. All of these things, and more, can be done using CNS Image, and you do not even have to leave FileMaker to accomplish them.
You can also use CNS Image to download an image from the internet right into a container field. Such a feature can be used to download webcam images, dynamic images of the earth, road maps, and even images to update the look of your solution. Imagine creating a new backdrop, header, or logo that is automatically downloaded when your users open a solution you have created.
CNS Image also gives you the ability to apply a QuickTime filter to an image. QuickTime comes with several built in filters such as Brightness, ColorSync, HSL Balance, RGB Balance, Blur, Edge Detection, Emboss, Sharpen, Color Style, Color Tint, and more. There are also third party filters available on the internet.
What once was impossible, is now a reality, with CNS Image and FileMaker 7.
The Convert function allows you to change the format of an image including the width and height as the images below demonstrate.
Below are three examples of using CNS Image to crop.
You can use CNS Image to apply a filter to an image. The following filters have been applied to the CNS Logo below: Blur, Brighten, Hue, Lightness, RGB (Full Blue), RGB (Full Green), RGB (Full Red), Saturation, Colbalt, Lens Flare, Sepia, Sharpen, Soloarize, Tint (with custom settings), and Xray. Keep in mind that these are just a few examples.
Below are examples of the Reflect fucntion for horizontal, virtical, and both.
Below are a few examples of rotating an image.
Below are several examples of using the Transform function on an image. As you can see, you can get some very interesting results.
Below are a few examples of images downloaded via a URL. Pictured is the Alamo cam, the SOHO TRACE cam, and the Jesse cam (Jesse and son Samuel) at http://jesse.cnsplug-ins.com
Installing CNS Image is very easy. If FileMaker Pro is open, then close it. Next, locate the folder on your hard drive that contains your FileMaker Pro application. For Macintosh, this is usually in the Applications folder; while on Windows, it is usually in the Program Files folder. Next to the FileMaker Pro application, you should see a folder named Extensions. Copy the plug-in file into this folder to install it into FileMaker Pro.
After installing the plug-in as described above, you can open FileMaker Pro again and set the defualt preferences if you wish. To do this on Windows, go to the "Edit" menu, and then select "Preferences". This should bring up the "Preferences" dialog. Next, click on the "Plug-ins" tab, and then double-click the CNS Image plug-in. On Mac OSX, go to the "FileMaker Pro" menu, and then select "Preferences". This should bring up the "Preferences" dialog. Next, click on the "Plug-ins" tab, and then double-click the CNS Menu plug-in.
Once the Configuration Dialog is open, click the Basics tab where you can set the following value. The Add Help Comments to External Functions check box allows you to enable or disable the help comments that are displayed in a calculation window when inserting a function into your calculation.
The About Tab reports which version of CNS Image you are using, who the plug-in is registered to, and how many seats the plug-in is registered for. You can also use the Version function to bring up the Configuration Dialog by passing the function the string "CONFIGURE" or the string "ABOUT". To make sure that you have the most recent version of CNS Image, please visit our website (http://cnsimage.cnsplug-ins.com/)
When you decide to purchase CNS Image, you can obtain a license from our secure online purchase form at https://secure.comm-unity.net/products.htm?product=CNS%20Image. Once you have purchased a license to use CNS Image, we will email you a registration code to register your copy of the plug-in. To do that, open any of the example databases, press the "Register CNS Image" button, and enter your registration information.
The example database demonstrates how to use CNS Image to manipulate images directly in FileMaker. It will show you how to import and export images. It will show you how to gather information about an image. Additionally, it will demonstrate how to convert, scale, crop, rotate, reflect, transform, get a layer, and apply a QuickTime filter to an image. You can also download an image from the internet directly into a container field.
The example database goes one step further by giving you six mini solutions that are great starting points for your own solutions. You can also easily integrate these ideas into your current solutions. The mini solutions include: Screehshot Crop, Webcams, Earth View, Map Viewer, Simple Image Browser, and PDF Page Splitter.
All examples have documentation on the same layout as the example for quick reference. Examples are listed in the "Example Index" area and are sorted by the "Example Rating" which can be found at the bottom of each example.
You may want to note the "If you want to..." link in the top right corner of each layout. This link leads to a layout which has a task oriented list of things you may want to do, and links to quickly get to the information you need to know. For example, if you want to "Crop an image" then view the example "Crop" or view the function "CNSImage_Crop". There are buttons that take you to the example or the function depending on what you want to do.
There are several ways to get images into FileMaker. You can use the native capabilities to import images using only FileMaker. You can also use functionality in CNS Image to import images in ways that FileMaker cannot.
For example, you can create a dialog box that opens to a specified folder to import images from. You can even specify what type of images a user can import. You can also import an image to a container field by using a variety of different path types, including FileMaker 7 image paths.
The ability to export an image from a container field is somewhat limited when left to just FileMaker. However, several options are opened when using CNS Image. You can save an image to any folder with any name. So you can do interesting things like export each image in a found set to your desktop using the record ID as the file name.
This example demonstrates how you can use CNS Image to get information about an image such as its type, width, height, horizontal resolution, vertical resolution, depth, quality, size, path, and file name.
Using the CNSImage_Convert function, you can change the format of a image, the width and height, the resolution, the depth, the quality, and the target size. This example demonstrations how to accomplish these conversions.
This example demonstrates how to crop an image down, that is, to create a new image from part of a bigger image.
This example demonstrates how to use CNS Image to rotate an image.
This example shows you how to flip an image horizontally, vertically, or both.
This is where CNS Image can get a bit interesting because you can, for the first time that we know of, manipulate an image while still being in the FileMaker Pro environment. Never before could you change the hue of an image, or brighten or darken an image.
For example, say you have a picture that looks nice, but you want the colors to pop out more. Simply take a trip through the filter function and max out the saturation. Maybe you have a picture of a family member and you want to give it that old "Sepia" look. Not a problem. Just apply the "Color Tint" quicktime filter using the "Sepia" preset.
You can even use the filter function to tweak your graphical user interface images right in your database.
This example demonstrates the ability to download an image from the internet and put it directly into a container field. You simply give the plug-in a url and it will download the image and put it in the field you want it to. No importing is necessary. No temporary file is needed. No special tricks. Just a URL and the plug-ins takes care of the rest.
For some interesting uses of this function, take a look at the "Mini Solutions" that we have created for the example database including: "Webcams", "Earth View", and "Map Viewer".
The transform function allows you to pick 4 points of your image to adjust how the image is drawn. With it you can skew an image, stretch an image, or even squish an image.
This example takes a snapshot of a given layout and then crops the image to the correct size based on the actual size of window content. It also demonstrates just cropping out a portion of a layout based on field bounds.
The basic trick is to enter preview mode, copy, and then paste the resulting image into a container field. You can then use CNS Image to crop it to the needed size.
This "Mini Solution" is a simple webcam viewer. You can choose a category from the pull down menu on the top left, and then click a link in the portal to view the web cam picture.
This example includes several interesting ideas such as downloading an image that changes at set intervals such as every minute or every day. While the image is downloaded, we actually set the container field to a text string to show the download progress. After the image is downloaded, you have the option to automatically rotate and flip it based on field values. We also create a 25 pixel thumbnail icon after the image is downloaded just for good measure.
We have included a decent range of images to download from daily cartoons, famous places, photos of the sun that were taken within the last hour by NASA, and even the current weather for the entire USA. These are all images that are available free on the internet, so keep in mind that any of the images may change, may be temporarily down, or may no longer be offered by their respective servers.
This "Mini Solution" uses the "Earth and Moon Viewer" website located at http://www.fourmilab.ch/earthview/vplanet.html to grab generated images that show day and night regions of the Earth at this moment. There are many different variables that you can tinker with to get a wide variety of images.
You can also use different image types for the Earth as well as the Moon. In addition, you can change the view point and the date and time for an image.
This example retrieves a dynamically created map from the TIGER Map Server of the U. S. Census Bureau. For an overview of the system, take a look at http://www.census.gov/geo/www/tiger/tigermap.html. To view a map on the site, visit http://tiger.census.gov/cgi-bin/mapbrowse-tbl.
The Map Viewer example allows you to select a location via a "Quick Lookup" portal. You can then change the attributes of the map for roads, bounds, and labels that are shown. We have also built zooming and panning (moving) into the solution.
Keep in mind that the system is based on information from 1990 and 1998, so it is somewhat old. It does, however, help demonstrate that you can build a map browser inside of FileMaker with very little work and the use of the CNSImage_GetFromURL function.
The TIGER maps are public domain, so this service is free. However, because the data is old it may only be partially useful. The TIGER website also makes it quite clear that the service is not meant to be a full fledged map server the likes of MapQuest or Maporama, or Google Maps.
Both Mapquest.com and Maporama.com offer commercial solutions that can be integrated into FileMaker in a fashion similar to, if not exactly like, this example.
This "Mini Solution" demonstrates a simple image browser. Using FileMaker, you can import a folder of images. You can then navigate through them with the forward and backward buttons. You can click an image to view detail for the image. You can then edit the image by using the buttons to rotate, apply filter, flip, and crop. If you are using the OS X version of FileMaker, you can use the "Set Mac Desktop" button to set the desktop picture to the currently selected image. Lastly, you can export your edited image.
This example takes a PDF and splits it into jpegs. It includes a script that will iterate through each page of the PDF and save them in a portal. The end result is one JPEG image record for each page of the original PDF. The script uses the CNSImage_GetLayer function and renders each page at 72dpi. You can also render pages at 300dpi if needed.
This example simply lists a few custom functions that are used in this database as well as a few that may come in handy that are not actually used in this example database. If you are using FileMaker Developer, you can view and edit Custom Functions. If you are just using FileMaker Pro, you can use Custom Functions, but you cannot edit them.
FileMaker introduced Custom Functions with FileMaker Developer 7. Custom functions allow a developer to create their own functions using any functions available to them in the calculation engine. This includes normal FileMaker functions, but also includes any Plug-in functions that are installed as well.
Email: cnsimage@cnsplug-ins.com
CNS Image Website: http://cnsimage.cnsplug-ins.com
Main Website: http://www.cnsplug-ins.com/
Phone: 817-560-4226
Fax: 817-244-0340
You can write us at:
Comm-Unity Networking Systems
8652 Camp Bowie West
Fort Worth, Texas 76116
The following is a list of all available functions and a complete description of each. For general information on how the External functions work and how you can use them in your calculations, please see the How to use Plug-ins PDF Document available on the CNS Plug-ins website.
Image Name | File Type | File Extensions |
---|---|---|
JPEG | JPEG | .jpg; .jpeg; .jfif; .jpe |
GIF | GIFf | .gif |
PNG | PNGf | .png |
Windows Bitmap | BMPf | .bmp |
Macintosh PICT | PICT | .pct; .pict; .pic |
TIFF | TIFF | .tif; .tiff |
Photoshop | 8BPS | .psd |
QuickTime Image | qtif | .qif; .qti; .qtif; .qt |
Silicon Graphics | .SGI | .sgi |
Targa | TPIC | .tga; .tpic |
MacPaint | PNTG | .mac |
Image Name | File Type | File Extensions |
---|---|---|
Image Name | File Type | File Extensions |
---|---|---|
JPEG | JPEG | .jpg; .jpeg; .jfif; .jpe |
PNG | PNGf | .png |
Windows Bitmap | BMPf | .bmp |
TIFF | TIFF | .tif; .tiff |
Photoshop | 8BPS | .psd |
QuickTime Image | qtif | .qif; .qti; .qtif; .qt |
Silicon Graphics | .SGI | .sgi |
Targa | TPIC | .tga |
MacPaint | PNTG | .mac |