• 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: How do we Convert PICT to JPEG
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do we Convert PICT to JPEG


  • Subject: Re: How do we Convert PICT to JPEG
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 18 Aug 2015 09:39:30 +1000

On 18 Aug 2015, at 9:03 am, Malcolm Fitzgerald <email@hidden> wrote:

I compared the output of the two methods I tested

FWIW, the documents for NSBitmapImageRep, which is how Cocoa apps can do the conversion, says:


WARNING

There is no guarantee that the image will render exactly the same as it would under QuickDraw because of the differences between the display medium and QuickDraw. In particular, some transfer modes and region operations may not be supported.


So given that Kevin's app is probably using QuickDraw, it's likely to give the more accurate rendition. OTOH, the issue is likely to be academic, given how the images were added in the first place.



On 18 Aug 2015, at 7:09 am, Yvan KOENIG <email@hidden> wrote:

Adding a filter was so easy that I didn't wait before inserting it

If you want more comprehensive filtering, you could insert this:

-- check if UTI of file is one NSImage can read
set theWorkspace to current application's NSWorkspace's sharedWorkspace()
set theType to theWorkspace's typeOfFile:oldPath |error|:(missing value) -- returns UTI of file
set supportedTypes to current application's NSImage's imageTypes() -- returns supported UTIs
if (supportedTypes's containsObject:theType) as boolean is false then
error "File format is unsupported"
-- check required type doesn't already match
else if (theWorkspace's filenameExtension:destExt isValidForType:theType) as boolean then
error "No conversion needed"
end if




-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >How do we Convert PICT to JPEG (From: Malcolm Fitzgerald <email@hidden>)
 >Re: How do we Convert PICT to JPEG (From: Iurista GmbH <email@hidden>)
 >Re: How do we Convert PICT to JPEG (From: Mark Hunte <email@hidden>)
 >Re: How do we Convert PICT to JPEG (From: Kevin Meaney <email@hidden>)
 >Re: How do we Convert PICT to JPEG (From: Mark Hunte <email@hidden>)
 >Re: How do we Convert PICT to JPEG (From: Kevin Meaney <email@hidden>)
 >Re: How do we Convert PICT to JPEG (From: Malcolm Fitzgerald <email@hidden>)

  • Prev by Date: Re: How do we Convert PICT to JPEG
  • Next by Date: Re: date syntax not working on 10.10.5?
  • Previous by thread: Re: How do we Convert PICT to JPEG
  • Next by thread: Re: How do we Convert PICT to JPEG
  • Index(es):
    • Date
    • Thread