Skip to main content
Participant
November 12, 2008
Question

Updating graphics en masse

  • November 12, 2008
  • 3 replies
  • 474 views
Here's an odd one--

We've always used .bmp files for manual images, but I'd like to batch convert the images to .png to save disk space on our servers.

I really don't want to reimport all graphics in Frame, however. Does anyone know of a slick way to essentially use find/replace to change .bmp to .png in the paths of graphics that are imported by reference? It seems that there ought to be a way to get at these tags, but I don't know of one.

Thanks in advance.
-Kevin
    This topic has been closed for replies.

    3 replies

    Participating Frequently
    November 13, 2008
    Our FileTools plugin has a feature that will save each file in a book to MIF, run a script, then reopen the file an overwrite the FM file. This would let you do a search/replace using Perl or other scripting language and perform this cleanup.

    http://leximation.com/tools/info/filetools.php

    Cheers,

    ...scott

    Scott Prentice
    Leximation, Inc.
    www.leximation.com
    Inspiring
    November 13, 2008
    I've recently started using Text Workbench for stuff like this, and love it. It will do recursive S&Rs on directory trees and supports logical expressions.
    It works with some binary files, but I haven't tried it with .FM files. It'd be worth testing on COPIES of your files, or as Nils suggests, save the fm files out as MIF and work with those. (Omsys.com and several other third party outfits support saving all files in books or directories out as MIF, so you should still be able to batch the files, once you test on a few individuals.)
    Legend
    November 13, 2008
    My first thought would be via .mif, but you'd need to take a look at the docs first to see exactly what you'd need to change in the .mif files. And make a back-up first. And try some cautious tests ... Give it a try and see if it suits?
    Known Participant
    November 13, 2008
    Please note that editing MIF requires you to not only
    change the filename in the image's path, but also
    change the filter identifier. And it needs to be exactly
    right. Replace one of the files manually and compare
    the MIF code for the two versions.

    --
    /Thomas Michanek