• 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: Drawing with CIImages (was "again with paths and images")
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing with CIImages (was "again with paths and images")


  • Subject: Re: Drawing with CIImages (was "again with paths and images")
  • From: "douglas a. welton" <email@hidden>
  • Date: Thu, 21 Dec 2006 14:45:07 -0500

The CIImage -draw... methods (probably*) appear in the AppKit documentation for the same reason that the NSString -draw... methods appear in the AppKit documentation. AppKit is the place where the drawing APIs reside - it has nothing to do with string handling or image processing. By putting the -draw... methods in the AppKit, you allow users who are building image processing applications that require no-drawing-to-the-screen to link against the Core Image Framework without having to also drag in the AppKit which may contain nothing they need.

In other words... division of labor.

later,

douglas

*Since I did not write the documentation or any of the Cocoa libraries, any speculation on my part about the intentions of the writers and programmers involved in Cocoa's development is pure guess work or perhaps total BS... ;^}

On Dec 21, 2006, at 2:27 PM, Roland Torres wrote:

Wow, I never knew these methods existed! Why on earth isn't this info integrated into the rest of the documentation, under the object where it belongs???

Roland

On Dec 21, 2006, at 11:12 AM, douglas a. welton wrote:

The ones documented here:

<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/CIImage_AppKitAdditions/index.html#// apple_ref/doc/uid/TP40003998>


On Dec 21, 2006, at 2:07 PM, Roland Torres wrote:

Hmm, what -draw... methods are there for CIImage? A look in CIImage.h shows none, nor does the documentation list any. It would be too good to be true. ;-)

Roland


On Dec 21, 2006, at 10:59 AM, douglas a. welton wrote:

Are you doing anything with the resulting NSImage other than drawing it (e.g., archiving or using other NSImageReps)?

If not, I'd just use CIImage's -draw... methods and be done with it.

later,

douglas

On Dec 21, 2006, at 1:34 PM, Michael Watson wrote:

Speaking of drawing CIImages into views, currently I'll create my CIImage, draw it into an NSImage, and then use the NSImage in whatever view I'm drawing into.

I suspect I may be doing more work than is necessary to use CIImages. Any tips from the crowd?


-- m-s

On 21 Dec, 2006, at 12:39, douglas a. welton wrote:

Your situation seems like a perfect fit for using Core Image. Create a CIImage, draw it into the first view, then apply a the crop and scale CIFilters (CICrop & CILanczosScaleTransform ) and draw the image into the second view. All the work gets done on the GPU, roughly in realtime.

regards,

douglas

On Dec 21, 2006, at 6:13 AM, Livio Isaia wrote:

Skip this if you have no time to loose!

I know that my problem seems a bit strange, if not silly, but here's the reason why.

I have two views into which I draw the same image: in the first one at normal size, in the second in a scaled size (bigger) so that the user can clearly see each image pixel. Practically a pixel in the first view will become a 6x6 rect in the second one.
Now, if I draw a bezier path (let's say an oval one, for example) in the first, I want it to be drawn also in the second, but here pixels will become rects, and if I use a scaling transformation I'll get a bigger oval but not a sequence of rects. Hope it's clear...


That's why I thought to draw it all in one image and then draw it in a bigger rect (after all the final result will be a single image...). Of course it' not a great solution, and it's expensive in terms of time and memory.

I tried to calculate the path rects using formulas but with no exciting results (do you know where to find the formulas used in bezier paths?).

So any idea will be apreciated!

Thanks again to everybody,
livio.





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >again with paths and images (From: Livio Isaia <email@hidden>)
 >Re: again with paths and images (From: "douglas a. welton" <email@hidden>)
 >Drawing with CIImages (was "again with paths and images") (From: Michael Watson <email@hidden>)
 >Re: Drawing with CIImages (was "again with paths and images") (From: "douglas a. welton" <email@hidden>)
 >Re: Drawing with CIImages (was "again with paths and images") (From: Roland Torres <email@hidden>)
 >Re: Drawing with CIImages (was "again with paths and images") (From: "douglas a. welton" <email@hidden>)
 >Re: Drawing with CIImages (was "again with paths and images") (From: Roland Torres <email@hidden>)

  • Prev by Date: Re: Drawing with CIImages (was "again with paths and images")
  • Next by Date: Re: Cocoa called from Carbon, objc_msgSend crash in 10.3.9.
  • Previous by thread: Re: Drawing with CIImages (was "again with paths and images")
  • Next by thread: Re: Drawing with CIImages (was "again with paths and images")
  • Index(es):
    • Date
    • Thread