Quark: Perfect or proportional fit?

Good morning all,

I have a script that places images based on their filename position in a specific list. (i.e. filename1
filename2
filename3
etc.)

My problem is this:
The picture boxes vary in size. Sometimes the image fits the box exactly (i.e. a 3x4 box has a 3x4 picture) however, sometime the image is slightly off from the box (i.e. 3x4 box has a 3x4.25 picture).

The script places image as exact fit. Sometimes an image that fits at 100% is placed at 99.7% x 99.3%. This requires an adjustment by the art director and drives him crazy.

My questions is this:
Can Quark or AS determine if the image fits the box at 100% and place accordingly, and determine if the image will fit the box at (say) 99.5% x 98.72% and place accordingly?

I can only have it set bounds as exact or set bounds as proportional. One or the other.

How do I add some intelligence to my script? (Since adding intelligence to myself seems too great a challenge!)

OS 9.2.2 (until February and then we get OS10.3.x)
AS 1.6
Quark 4.11

Thank you,

Steven.

Quark reads the bounds of an image’s preview (72 dpi) and adjusts the fit accordingly. This is probably causing you to get the slight variations in placement of the images close to 100% but mot 100%. The best that I could suggest is to go ahead and place it they way you are and build in an if statement that takes into account a “margin of error” and then bumps it back to 100% if it is within this preset number, say 99.5-100.5%. From your description I assume that the non-proportional placement of the art is OK, so you would test for each value and reset them if needed individually. If you wanted a proportional fit, then place it proportionally, test and reset values if needed.

Steven,

It sounds like you want the picture to fill the box while maintaining proportions (a feature that should have been added to Quark and InDesign years ago).

A script can do this. Just continue to place the images as exact fit. Then immediately get the scale of the image (scale of image 1 of picture box x as list). The “as list” part is important because otherwise you will get a special Quark class. Then take each item of the list and coerce it to a real. Find the larger number, then apply that percentage to both dimensions (set scale of image 1 to {x,x}). Then you will probably want to center the image after that (set bounds of image 1 to center, or centered, depending on version).

Although all of this work is done after the image is placed, it goes very quickly. And because it works with the scale and not the bounds, you don’t have to worry about the preview image bounds not matching the actual image bounds.

Ray

Thank you for the suggestions. I’ll try them today and let you know how it is working out.

If the image is distorted 1 to 3 percent it should not be a problem but I would prefer it be placed at 100% if is was built to the correct size. We’ll see?

Thank you,

Steven.

Have you got it working?

If not you can mail me an I sent you my extermly intelligent script :smiley: what -I think- will do what you want.

mdlvw@worldonline.nl

Michiel