home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 10187 
 fpirrone@localnet.com to All 
 Re: Looking for a Ubuntu equivalent of X 
 28 Feb 07 20:17:50 
 
Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.co
!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilin
.net!spamkiller2.gnilink.net!gnilink.net!trndny09.POSTED!3d5eba02!not-for-mail
From: Frank 
Subject: Re: Looking for a Ubuntu equivalent of XP sending picture by email -
converson script
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing
moment of clarity.)
Message-Id: 
Newsgroups: alt.os.linux.ubuntu
References:   
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 60
Date: Thu, 01 Mar 2007 01:17:49 GMT
NNTP-Posting-Host: 72.75.240.119
X-Complaints-To: abuse@verizon.net
X-Trace: trndny09 1172711869 72.75.240.119 (Wed, 28 Feb 2007 20:17:49 EST)
NNTP-Posting-Date: Wed, 28 Feb 2007 20:17:49 EST
Xref: number1.nntp.dca.giganews.com alt.os.linux.ubuntu:11229

On Wed, 28 Feb 2007 09:43:36 +0000, Chris wrote:

> In article , Toby 
> Newman  writes
>>On 2007-02-27, Chris  wrote:
>>> Is there an elegant Ubuntu way of doing something that I do a lot with
>>> XP?
>>> When I want to email a photograph with XP, I right click on the picture
>>> and select Send To - Mail Recipient.
>>> What this does is to make a re-sized and compressed version of the
>>> picture (without affecting the original) and then launch the default
>>> email client, with the picture set up as an attachment in a new email.
>>> This makes it amazingly quick and easy to email a photograph to someone.
>>> Now, is there an elegant way of doing this in Ubuntu?
>>> It doesn't need to be completely as easy.
>>> Just as easy and quick as possible.
>>> I can think of crude ways of doing it, such as using an image editing
>>> program to resize every picture as it is put onto the computer.
>>> But I bet there are neater ways of going on.
>>> And I welcome ideas from the experts reading this.
> 
>>The command 'convert' will let you easily resize a file:
>>convert -sample 1024x768 inputFile outputFile
>>It's part of imagemagik.
>>You could do a script which prompted you for a filename and an email
>>address and it did the above and then emailed it for you.
> 
> Hmmm ... someone competent, like you, probably could do that.
> And I envy you.  I wish I could.
> That does sound the absolutely best solution.
> I wonder if enough people would find it useful for someone like you to 
> be kind enough to publish such a script?

Hey Chris,

Here's a script - 

for f in *.[jJ][pP]*[gG]
do convert -scale 640x480 $f ${f%%.[jJ][pP]*[gG]}_sm.jpg
done

just drop it into a file (e-mail_format_picture or
whatever) using any editor, 

chmod 755 that file so it can be executed
directly, 

place it in any /bin directory that's in your path (/bin
/usr/bin /usr/local/bin /opt/bin whatever) 

and whenever you execute it in a directory where your JPEG images for
mailing are located will scale all named jpg or JPG or jpeg or JPEG to no
greater than 640 height and 480 width, renaming them whatever they were to
start ending in _sm.jpg indicating small and ready to mail.

You could add an additional piece of code to wrap this in a mailing
command but that's overkill.  Again, ImageMagick has to be on your system
since that's where the convert function comes from. 

Frank
--- Platinum Xpress/Win/WINServer v3.0pr5
 * Origin: Omicron Theta BBS (1:261/20)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca