Jump to content

Convert BMP to PNG in script?


This topic is 5609 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 5609 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.