• 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
FileDimensions_PDF script shows RGB when they are CMYK
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileDimensions_PDF script shows RGB when they are CMYK


  • Subject: FileDimensions_PDF script shows RGB when they are CMYK
  • From: "Ripka, Herb" <email@hidden>
  • Date: Wed, 2 May 2007 15:01:35 -0500
  • Thread-topic: FileDimensions_PDF script shows RGB when they are CMYK

When running this on a folder of PDFs where all are CMYK PDFs, the Image_Log.txt file reads that they are RGB.

???

--Herbert Ripka
Greendale, WI



to MakeList(ProcessFolder)
	tell application "Finder"
		set filelist to (files of entire contents of alias ProcessFolder whose name extension is "pdf" as list)
		return filelist
	end tell
end MakeList

to GetDimensions(TheFile)
	tell application "Image Events"
		launch
		set MyImage to open alias TheFile
		set MyResolution to resolution of MyImage
		set MyDimension to dimensions of MyImage
		set MyColorspace to color space of MyImage
		set InfoList to name of MyImage & "    " & MyResolution & "    " & MyColorspace & "    " & (item 1 of MyDimension) / (item 1 of MyResolution) & "    " & (item 2 of MyDimension) / (item 2 of MyResolution) & return
		close MyImage
	end tell
	return InfoList
end GetDimensions

set ProcessFolder to (choose folder) as string
set filelist to MakeList(ProcessFolder)
set MyPath to ((path to desktop folder) as string)
set logfile to MyPath & "Image_Log.txt"
open for access file logfile
close access file logfile

set MyList to ""
repeat with AnItem in filelist as list
	set MyList to MyList & (GetDimensions(AnItem as string))
end repeat
open for access file logfile with write permission
write MyList to file logfile
close access file logfile
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Lock Brightness Controls
  • Next by Date: Re: How to compare contents of a folder against a list?
  • Previous by thread: Lock Brightness Controls
  • Next by thread: Replacing textures in Photoshop CS3 Extended?
  • Index(es):
    • Date
    • Thread