Then, in late 2010, it disappeared from the guide, and seems to have
been totally erased.
Was this capability removed from OS X?
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (Quart...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/quartz-dev-garchive-50095%40googlegroups.com
This email sent to quartz-dev-g...@googlegroups.com
thanks,
michael
On Sep 28, 2011, at 9:51 AM, David Duncan wrote:
> On Sep 28, 2011, at 7:40 AM, David Hoerl wrote:
>
>> I read with some interest about the Python bindings, and even found a early 2010 version of the Quartz 2D Programming Guide with a section on then.
>>
>> Then, in late 2010, it disappeared from the guide, and seems to have been totally erased.
>>
>> Was this capability removed from OS X?
>
> The python bindings were deprecated in favor of general Scripting Bridge support that was introduced in Mac OS X 10.5 (iirc). Through the Scripting Bridge you have access to all of Mac OS X, as such you can use the Quartz C API directly rather than via the bridge.
> --
> Reality is what, when you stop believing in it, doesn't go away.
> Failure is not an option. It is a privilege reserved for those who try.
>
> David Duncan
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartz-dev mailing list (Quart...@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quartz-dev/michael%40gearyweb.com
>
> This email sent to mic...@gearyweb.com
> I read with some interest about the Python bindings, and even found a early 2010 version of the Quartz 2D Programming Guide with a section on then.
>
> Then, in late 2010, it disappeared from the guide, and seems to have been totally erased.
>
> Was this capability removed from OS X?
The python bindings were deprecated in favor of general Scripting Bridge support that was introduced in Mac OS X 10.5 (iirc). Through the Scripting Bridge you have access to all of Mac OS X, as such you can use the Quartz C API directly rather than via the bridge.
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.
David Duncan
_______________________________________________
I'm trying to build a "Service" that downloads images from my companies
web sites, saves them in a folder named after the current web page, then
modifies the images.
In my case I need to crop the images - that is, to extract a subimage in
the interior of the downloaded images.
Now, I told my boss that this was a piece of cake, Apple has this
powerful Automator and the "sips" (Scriptable Image Processing System)
command line tool, and I could knock this out in a few hours.
Well - to my chagrin, sips cannot be coerced into extracting arbitrary
crops - it does so from the center and there is no way to do what I
needed :-(
In the end I wrote a small command line program to do what was needed -
its like 10 lines of code - but now I cannot distribute the Automator
action as it needs an executable (well, I probably COULD embed that
program in the Automator based service but it seems like cheating.
So, today, I tripped on a page referring to Python bindings, so I
thought - ahah - I can do this with a Python script.
---
So, as Michael asked, are there some example scripts I can read to see
how to do this? Could I really read in an image from a file, operate on
it, then write out another image to a file using the Scripting Bridge???
David
PS: in case anyone cares, it would be just GREAT if someone could
enhance sips - which appears to have not been touched since Tiger. There
are many people who have complained on the web of the inability to
specify a crop offset: rdar://10185319
So, as Michael asked, are there some example scripts I can read to see how to do this? Could I really read in an image from a file, operate on it, then write out another image to a file using the Scripting Bridge???
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (Quart...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
We'd love, love, love to see Apple spend some more time on it. I've expressed this to Apple folks in the past - if there's something more formal I could do, please, Apple folks, let me know.
On Sep 28, 2011, at 1:43 PM, David Hoerl wrote:
> http://lists.apple.com/mailman/options/quartz-dev/wave%40pixar.com
>
> This email sent to wa...@pixar.com
michael
> http://lists.apple.com/mailman/options/quartz-dev/michael%40gearyweb.com
>
> This email sent to mic...@gearyweb.com
_______________________________________________
> wait, you're at Pixar, and you don't have any better contact to Apple than this list?? How depressing.
>
Hopefully it's not depressing that you have access to the same help as Pixar tools developers, plus the help from them too from time to time :) _______________________________________________
michael
in interactive mode.. (python -i in terminal)
from Quartz import *
help(CIImage)
CIImage.imageWithContentsOfURL_("somevalidpath")
help(CIImage.imageWithContentsOfURL_)
fun!
m
> http://lists.apple.com/mailman/options/quartz-dev/markusca%40mac.com
>
> This email sent to mark...@mac.com
suppose that Apple put "sips" on github - and they adjudicated the "pull
requests". So many of us would contribute, they could pick and choose
what to take.
sips cannot be anything more than good demo code - what they post on
their dev sites all the time.
Why keep it internal, especially after so many updates?
Ah - "Shangri-La" - for those of you old enough to remember what that
means...
David
I believe David was really referring to BridgeSupport, which is the
foundation of the Python and Ruby bridges. "Scripting Bridge" is
indeed a technology for generating Objective-C wrappers to Apple
Events.
--Kyle Sluder
Mark - OK - now we're cookin! So you knew the magic incantation - "from
Quartz import *". How is a mere mortal such as me suppose to know these
magic commands?
That's what I was really trying to get at - there must be some
documentation on this somewhere, and example scripts. For instance, how
would I ever know I needed to import Quartz?
David
Well, I was responding to David Duncan's comment early on in this thread:
The python bindings were deprecated in favor of general Scripting Bridge
support that was introduced in Mac OS X 10.5 (iirc). Through the
Scripting Bridge you have access to all of Mac OS X, as such you can
use the Quartz C API directly rather than via the bridge.
That's what I was really trying to get at - there must be some documentation on this somewhere, and example scripts. For instance, how would I ever know I needed to import Quartz?
Well, I was responding to David Duncan's comment early on in this thread:
The python bindings were deprecated in favor of general Scripting Bridge support that was introduced in Mac OS X 10.5 (iirc). Through the Scripting Bridge you have access to all of Mac OS X, as such you can use the Quartz C API directly rather than via the bridge.
import ctypesiokit = ctypes.cdll.LoadLibrary("/System/Library/Frameworks/IOKit.framework/IOKit")iokit.IOHIDElementAttachimport objcobjc.loadBundle("Automator", globals(), bundle_path=objc.pathForFramework('/System/Library/Frameworks/Automator.framework'))AMAction
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (Quart...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
Yes, it is. David originally meant to refer to BridgeSupport, which is
the "objc bridge" your'e talking about. It actually bridges more than
just ObjC.
--Kyle Sluder
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (Quart...@lists.apple.com)
Help/Unsubscribe/Update your Subscription: