• 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: Final round with NSTIFFCompressionCCITTFAX3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Final round with NSTIFFCompressionCCITTFAX3


  • Subject: Re: Final round with NSTIFFCompressionCCITTFAX3
  • From: Cameron Hayne <email@hidden>
  • Date: Thu, 12 Sep 2002 00:28:02 -0400

On Wednesday, September 11, 2002, at 10:32 pm, Ben Mackin wrote:
I am not sure on the algorithm to convert to black and white, but I heard it
is pretty difficult.

It shouldn't be that difficult. Seem to me you could do it with something like the following method posted by Andrew Zamler-Carhart:
(http://cocoa.mamasam.com/MACOSXDEV/2002/08/2/42969.php)

@implementation NSColor (DarkColor)

- (BOOL) isDarkerThan: (float) lightness {
NSColor *monoColor = [self colorUsingColorSpaceName:
@"NSCalibratedWhiteColorSpace"];
return ([monoColor whiteComponent] < lightness);
}

Two more points:
1) I too am surprised that this sort of image format conversion isn't available via some Cocoa API.
2) You should tell us what your reason for all this is - since maybe there is an easier way of achieving your higher-level goals. You had mentioned earlier on that you have so far been doing this conversion with GhostScript - what is it that you need the CCITTFAX3 images for?
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Final round with NSTIFFCompressionCCITTFAX3 (From: Ben Mackin <email@hidden>)

  • Prev by Date: Re: [newbie] NSString code so it won't leak
  • Next by Date: Re: [newbie] NSString code so it won't leak
  • Previous by thread: Re: Final round with NSTIFFCompressionCCITTFAX3
  • Next by thread: Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
  • Index(es):
    • Date
    • Thread