How to modify a document's graphic tags to reflect the actual dimensions of the graphics file?

This code snipped was drafted by Frank Marent, enhanced by Brent Hartwig, and slightly beautified by the editor, Karl Johan Kleist. Last Updated: 2006-09-22

A collaborative event...

function imgsizes { local oid_arr[]; local oid; local imgWidth; local imgHeight; oid_find_children(oid_null, oid_arr, 'our-graphic-tag-name') for (oid in oid_arr) { oid_graphic_size(oid, imgWidth, imgHeight, 1); oid_modify_attr(oid, reproDepth, imgWidth); oid_modify_attr(oid, reproWidth, imgHeight); } }