Replacement for BestFitJPEG for images

The BestFitJPEG command has been removed from PanX and I want to resize some graphics. What have you found to be the best way to do that, anyone?

If you want to resize the actual image of the file itself you could use the shellscript command with the unix sips command to resize (you could also do this directly in the Finder).

shellscript {sips -Z 768 1024 path+example.png}

The -Z keeps the image resizing proportional (-z will resize both height & width non-proportionally). The 768 is the height and the 1024 is the width values you can change to those you require. The file name should include the path to the file including the file name. This can simply be dragged into the procedure directly from the Finder.

If you have the image in a Image Display Object and want to resize that object via a procedure you should make sure the Image Display Object is named and is set to proportional in the Properties panel beforehand. You can then use changeobject to resize the Image Display rectangle.

changeobject "MyImageDisplay:, “rectangle”,rectanglesize(422, 249, 233, 324)

The values in the rectanglesize( function are listed in order of top, left, height, width. This way you can change both the size and location of the Image Display Object without ever changing the size of the actual image file.

Awesome. Never in a million years would I have figured that out. I’ll give it a try!