July 30, 200619 yr I need to be able to convert a Windows bitmap image (.bmp) stored in a container field to a .png format as part of a transfer script that moves it to a different container (in a different table). Is anyone aware of method that can be performed from within a script? Thanks for any help.
July 30, 200619 yr http://www.cnsplug-ins.com/products.htm?product=CNS%20Image CNS Image Plugin will allow for this... Or... you could write a script that exports the contents of the container field to a directory then use photoshop or some other graphic converter to batch convert the images. Then reimport them into your new table.
July 30, 200619 yr Author Thanks for the response. I've started looking at ImageMagick as one possibility. The drawback is that it adds 7Mb to a user's workspace just to convert to one file type. I was just hoping for something simpler like a command line utility or custom function of some sort.
July 30, 200619 yr Have you looked at the file [color:blue]Photo Catalog.fp7 that came with your Version 8 Application? [color:blue]FileMaker Pro 8 Advanced/English Extras/Templates/Home - Collections/Photo Catalog.fp7 It has a sample of a script to export the contents of a Container Field. I don't think you can convert them to png without directing that part of it through the second application (PhotoShop, etc.) I have set up a Batch in PhotoShop in the past that to convert a folder of photos from one format to another (i.e. PSD to Jpeg, etc.), and it worked pretty well. The trick will be getting the out and then importing them back in. Prior to v8, it required a plugin in, or AppleScript to get the contents of a Container Field. HTH Lee Edited July 30, 200619 yr by Guest
July 31, 200619 yr Author I believe I've found what I was looking for. The freeware utility BMP2PNG.EXE is less than 50Kbytes. Executing it via a Send Event script step converted a 4Mb BMP to a 180Kb PNG in just a flash (of the .cmd window) and gave a perfect result using its default settings. It offers a dozen different command line switch options that seem to cover the more challenging conversions (which mine aren't). I'm just glad to find something so specific to my task at hand. Thanks for the responses.
July 31, 200619 yr Interesting sounding process. I just did a [color:blue]Google search for [color:blue]BMP2PNG and found this for the Mac Link, anyone have any experience with either of these? Lee
July 31, 200619 yr in just a flash (of the .cmd window) If you uncheck the "bring target application to the front" in the Send Event script step, you won't see the flash.
Create an account or sign in to comment