• 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: Identifying the file types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying the file types


  • Subject: Re: Identifying the file types
  • From: Emmanuel <email@hidden>
  • Date: Mon, 26 Jan 2004 17:23:02 +0100

At 11:33 PM +0800 26/01/04, Takashi Yoshida wrote:
>Hi all,
>
>I'm writing a simple drag and drop application that will begin a
>slideshow of the photographs.
>User is supposed to drag a folder containing photos or selections of
>photo files into the application and the application will launch
>GraphicConverter to begin the slideshow.
>
>It's simple enough and I've already got it to work. The thing is, is
>there any reliable way to check whether the files dropped into the
>application are pictures? File extension is not really a reliable way
>to correctly identify the file types and I'm not sure if checking the
>file types or creator type are reliable (do Mac OS X applications still
>keep these information around?)

File types are still reliable, except sometimes they may be missing, and you've an extension instead, that you read easily (Finder has a specific property for that).

Otherwise, I would just ask "Image Capture Scripting.app" what it would think of opening the file and telling me its size. If if returns a reasonable size, then I would be pretty sure the file is a picture.

It's little known and little used I think, but Image Capture Scripting.app is in the standard install.

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Identifying the file types (From: Takashi Yoshida <email@hidden>)

  • Prev by Date: UI Element Inspector
  • Next by Date: Re: Scripting Additions 'Read' has stopped reaching EOF?
  • Previous by thread: Identifying the file types
  • Next by thread: Re: Identifying the file types
  • Index(es):
    • Date
    • Thread