[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: resize pictures received by mailserver



On Thu, Jun 14, 2012 at 11:47:52AM +0530, Kushal Kumaran wrote:
> On Wed, Jun 13, 2012 at 11:17 PM, Rob Owens <rowens@ptd.net> wrote:
> > On Wed, Jun 13, 2012 at 12:45:13PM +0200, Randall wrote:
> >>
> >> is it possible to have all messages received by the mailinglists MTA
> >> scanned for pictures and have these automatically scaled to a
> >> default size before its being redistributed to the receivers on the
> >> mailinglist and subsequently the forum.
> >>
> > craigslist.org seems to do this when you upload pictures of the item
> > you're selling.  I'm not sure how they do it, but I imagine they use the
> > mogrify command from imagemagick:
> >
> > mogrify -resize 800x600 somefile.jpg
> >
> > This will overwrite the original somefile.jpg with an 800x600 version of
> > somefile.jpg
> >
> > This gets tricky, because what if the original is taller than it is
> > wide?  The above command will distort the image.
> >
> 
> No it won't.  See the table at
> http://www.imagemagick.org/script/command-line-processing.php#geometry:
> 
> widthxheight 	Maximum values of height and width given, aspect ratio preserved.
> 
> You have to suffix the geometry with a "!" if you want to actually
> ignore aspect ratio.
> 
Hmm, I just tried it and you are correct.  I swear that it didn't always
work that way (or I'm getting old and imagining things).  Anyway, thanks
for the correction.

-Rob


Reply to: