• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scale a GIF with QT: possible? (yes it is)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scale a GIF with QT: possible? (yes it is)


  • Subject: Re: Scale a GIF with QT: possible? (yes it is)
  • From: Chris Adams <email@hidden>
  • Date: Tue, 08 Jan 2002 23:56:30 +0000

On 12/25/01 12:39 AM Dennis Wurster wrote:

> Hi Folks,
>
> I have a set of GIF images in a folder, and I'd like them to be 66%
> of their current size.
>
> Is there a way to accomplish this with AS and QT perchance?.... or do
> I need to register Graphic Converter?
>
yes. Here it is (I was working on it last night!). It works with jpeg and
gif without caring what the file type is. i imagine it will work with other
QTfile types.

-- get currentFileAlias by dropping or selection


tell application "QuickTime Player"
activate

open currentFileAlias

set mydimensions to dimensions of movie 1 as list

set width to item 1 of mydimensions
set height to item 2 of mydimensions

set currentAspect to width / height
-- with workaround for width/height being zero

-- target width should be established in advance

set resizedWidth to targetWidth
set resizedHeight to resizedWidth / currentAspect div 1
-- div 1 trims the decimals

set dimensions of movie 1 to {resizedWidth, resizedHeight}
-- you must establish the resizeFolder somehow
-- this duplicates the original file
set tempFile to (duplicate currentFileAlias to resizeFolder) as alias
export movie 1 to tempFile as picture using default settings
close movie 1 saving no
end tell


-- end segment.

Hope that this helps. I have a big script with error checking, etc. that I
can send to anyone who is interested.

--
Chris Adams
Cypress Lake Studios
Hypermedia, Quicktime, and Internet Design
http://www.cypresslakestudios.com
email@hidden


  • Prev by Date: Re: elapsedTime - one mo' time
  • Next by Date: Re: Convert first char to lower case
  • Previous by thread: Re: elapsedTime - one mo' time
  • Next by thread: Parameters with run handler
  • Index(es):
    • Date
    • Thread