To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.trainsOpen lugnet.trains in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Trains / 9666
9665  |  9667
Subject: 
a jpeg scaling utlitiy for Mac users
Newsgroups: 
lugnet.trains, lugnet.general, lugnet.publish
Date: 
Thu, 8 Feb 2001 19:46:26 GMT
Reply-To: 
cmasi@cmasi.chem.tulane.edu/spamcake/
Viewed: 
1801 times
  
I wrote a small drag and drop capable scripting applet that will scale jpegs for
us Macintosh users. The script requires AppleScript, which should have been
installed when the OS was installed, and Graphic Converter, a shareware image
editing program that you should be able to find on your favorite info-Mac site.

Mac users point your browsers to http://cmasi.chem.tulane.edu/ScaleScript

or use AppleShare's IP address option and connect to cmasi.chem.tulane.edu

Chris


From the Readme that goes with scale

Scale is a drag and drop capable AppleScript applet that will scale a picture by
a given percent.

I do not expect any problems, but I have to remind you to use this Applet at
your own risk. I will not be held responsible for any problems that may arise
from using this applet. By the way, I am not a programmer.

Requirements
Scale is known to work on a PB1400 running OS 9.1 and 9.0.4 and on a PowerMac
6100 running OS 8.1 (8.0, 8.5, and 8.6 should probably work, but I have not
tried them).
AppleScript and GraphicConverter are required
AppleScript is available from Apple Computer, and should have been installed
with your OS.
GraphicConverter is a shareware image editing program that can be downloaded
from your favorite info mac mirror site.

What does scale do?
Scale tells GraphicConverter to (1) open a graphic file (I have only used JPGs),
(2) scale the horizontal and vertical dimensions of the image to a percentage
entered by the user, and (3) save the file as a JPG to a new file name.

How do you use Scale.
Double Clicking Scale doesn't do anything except maybe ask where
GraphicConverter is located.
Drop a file or a bunch of files that are to be resized onto the Scale icon. (Do
not drop a directory on to Scale, because I, and therefore Scale, do not know
how to process files inside a directory.  See sentence 4 above.)
You will be asked where GraphicConverter is.
Find GraphicConverter and open it (you should only have to do this the first
time you use scale.)
Enter the factor to which you wish to scale your picture.
Click OK

Annoying/weird things that I know Scale does...
Creator Type
GraphicConverter changes the creator type of any file it opens to "GKON" the
moment the file opens. This means that whenever you double click the file from
now on GraphicConverter will open the file. You can reset the creator type to
JPEGview by opening the file with JPEGview and saving it again. You could also
use FinderPop (which is a very cool contextual menu module) to change creator types.

Naming Conventions
Scale makes a new filename by adding the "scaled to factor" to the original
filename. For example if DSC00002.JPG is scaled to 50 percent of its original
size the new file name becomes DSC0000250.jpg. To deal with long file names
scale will lop of the characters just before the ".jpg" part of the name to make
room for the scale factor. This could be a problem if you have a bunch of files
with really long names (>25 characters if the original file name doesn't end in
".jpg" or >29 characters if the original file name does end in ".jpg") that
differ by only the last few character because Scale will give all the new files
the same name.
Say you have a train wreck and you name all the pictures

a_hideous_mess_of_train_parts1
a_hideous_mess_of_train_parts2
a_hideous_mess_of_train_parts3
a_hideous_mess_of_train_parts4

and use scale to scale them to 50% of the original size. Here is what happens
Scale scales the 1st picture and saves it as
a_hideous_mess_of_train_p50.jpg
Scale scales the 2nd picture and saves it as
a_hideous_mess_of_train_p50.jpg
over-writing the first "a_hideous_mess_of_train_p50.jpg" without asking.

Enjoy,
Chris
cmasi@cmasi.chem.tulane.edu
--
See my LEGO creations at
http://cmasi.chem.tulane.edu/~lego/

Public key available upon request.



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR