At 5:56 PM -0500 3/31/00, Bill Birkett wrote: <snip> >I was trying to do the following: > >Open an image. >Change the size and resolution. >Apply the USM filter. >Save the document in it's original file format. >Close the document. > >With Glue, I was able to open the image and close it. The size and >resolution are special floating point values, and I couldn't get that to >work. The radius for USM is floating point, so that wouldn't work either. >Saving the document needed parameters to be set, such as the file format, >encoding method and so on. I never found a way to make that to work >properly, although I got close. > >With AppleEvents::Simple, I got everything to work, except for the >floating point parameters. I was even able to make the USM filter work by >supplying the radius as a string (e.g. "1.5"). Apparently, PhotoScripter >coerced that into a floating point value. But there were larger problems >with dimensions having units. For instance, to change the resolution, the >AppleScript reads: > >adjust docID changing image size to ¬ > {width:$width as inches, height:$height as inches, >resolution:$res as density, interpolation method:bicubic} > >This results in the width, height and resolution being sent as special >data types. Cal Simone, the author of PhotoScripter, wrote the following >in answer to my question about the stucture of these AppleEvents: > >"Essentially, unit types are doubleword (8-byte) floating point numbers >with the data type being a unit of measurement, such as 'inch', 'metr', >'cent', instead of 'doub', the same as typeFloat in Apple Events. So 3.0 >as inches is identical in data to just 3.0, except for the descriptor >type which is 'inch' instead of 'doub'." > >I have no idea how to accomplish this with Glue or AppleEvents::Simple. It >may not be possible becasue of limitations in AEGizmos. I don't know AEGizmos, but I wouldn't think there'd be any limitations like that. As for the issue of working with floats and doubles, that's something I'm hoping Chris will answer. I think you have to pack them, or something. I remember discussing something like this a few months ago. You might search the archives for stuff involving Glue and see what comes up. You might also be able to cheat by using AppleScript's text to number conversions, stick in something like '"3.14159" as real' or something. (in proper glue parlance, that is). -Jeff Lowrey # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org