• 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: Ben Mackin <email@hidden>
  • Date: Wed, 11 Sep 2002 19:32:20 -0700

On 9/11/02 7:23 PM, "Cameron Hayne" <email@hidden> wrote:

> Shouldn't the first line be:
> myDict = [NSDictionary dictionaryWithObjectsAndKeys:
> [NSNumber numberWithInt:NSTIFFCompressionCCITTFAX3],
> NSImageCompressionMethod, nil]; ?

Doesn't matter, I end up with the same thing.

I should be getting a 1-bit black and white image. The tiff you get is the
same as if you ran it with NSTIFFCompressionNone instead of
NSTIFFCompressionCCITTFAX3. So the tiff you get is just a normal tiff file.

I just found an old email, which advised me to look into the appkit
documentation (I thought I did, but must have missed something).

>> If compression is NSTIFFCompressionCCITTFAX3, then the data must be one
>> bit-per-sample and one sample-per-pixel

So it turns out I need to pass in a one bit-per-sample and one
sample-per-pixel (ie black and white) to get the file I want. So my issue
now is that I need a routine to convert to black and white, instead of
greyscale.

I am not sure on the algorithm to convert to black and white, but I heard it
is pretty difficult. I am surprised that no such routine exists to convert
to black and white (or does one, and I have overlooked it).

Thanks,
Ben

http://www.shayufilms.com
_______________________________________________
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.

  • Follow-Ups:
    • Re: Final round with NSTIFFCompressionCCITTFAX3
      • From: Cameron Hayne <email@hidden>
References: 
 >Re: Final round with NSTIFFCompressionCCITTFAX3 (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Re: Final round with NSTIFFCompressionCCITTFAX3
  • Next by Date: Re: Plugin design question
  • Previous by thread: Re: Final round with NSTIFFCompressionCCITTFAX3
  • Next by thread: Re: Final round with NSTIFFCompressionCCITTFAX3
  • Index(es):
    • Date
    • Thread