K1200 Posted July 30, 2006 Posted July 30, 2006 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.
Ocean West Posted July 30, 2006 Posted July 30, 2006 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.
K1200 Posted July 30, 2006 Author Posted July 30, 2006 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.
Lee Smith Posted July 30, 2006 Posted July 30, 2006 (edited) 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, 2006 by Guest
K1200 Posted July 31, 2006 Author Posted July 31, 2006 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.
Lee Smith Posted July 31, 2006 Posted July 31, 2006 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
Wim Decorte Posted July 31, 2006 Posted July 31, 2006 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.
K1200 Posted July 31, 2006 Author Posted July 31, 2006 Thank you, Wim! That was the finishing touch it needed.
Recommended Posts
This topic is 6752 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now