• 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: Cropping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cropping


  • Subject: Re: Cropping
  • From: Terry Heaford <email@hidden>
  • Date: Wed, 24 May 2006 21:57:46 +0100

Robert,

Thanks for your advice.

I have re-coded using CICrop successfully with the outcome it seems the same as my first effort.

Can you confirm if the quality of the image cropped changes as a result of the copying using either method.

Best regards

Terry

On 24 May 2006, at 20:22, Robert Walker wrote:

image = [[CIImage alloc]initWithBitmapImageRep:myImageRep];

If you are already using Core Image why not use it's cropping function:


...
...
// Crop the output image to be within the rect of the thumbnail.
crop = [CIFilter filterWithName: @"CICrop"
keysAndValues: @"inputImage", [transition valueForKey: @"outputImage"], @"inputRectangle",
[CIVector vectorWithX: 0 Y: 0 Z: bounds.size.width W: bounds.size.height], nil];
...
...


On May 24, 2006, at 3:13 PM, Terry Heaford wrote:

I have been trying to implement a cropping routine for an image.

I have got this far, it seems to work but I am unsure if the first two lines are suitable for getting the cropped part of the image. Can someone please confirm or point me in the right direction.




NSBitmapImageRep *myImageRep = [self bitmapImageRepForCachingDisplayInRect:selectedRect];
[self cacheDisplayInRect:selectedRect toBitmapImageRep:myImageRep];

[image release];
image = [[CIImage alloc]initWithBitmapImageRep:myImageRep];
[image retain];
[self adjustFrame];
selectedRect = NSZeroRect;



Thanks

--Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

-- Robert Walker email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40btopenworld.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Cropping (From: Terry Heaford <email@hidden>)
 >Re: Cropping (From: Robert Walker <email@hidden>)

  • Prev by Date: Re: Matrix with header cells
  • Next by Date: Re: Matrix with header cells
  • Previous by thread: Re: Cropping
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread