• 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: Useless function or possible BUG?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Useless function or possible BUG?


  • Subject: Re: Useless function or possible BUG?
  • From: Ben Mackin <email@hidden>
  • Date: Thu, 15 Aug 2002 20:45:05 -0700

On 8/14/02 8:51 PM, "Scott Anguish" <email@hidden> wrote:

> TIFF files can have different types of compression... JPEG, LZW (at
> least it was supported before) and I think one other, but i can't
> remember off the top.

Running my code, with the following function:

myNewData = [myTIFFasBitMap TIFFRepresentationUsingCompression:
NSTIFFCompressionPackBits factor:0.0];

Produces a properly compressed tiff image (256k in size). However running my
code with the following function instead:

myNewData = [myTIFFasBitMap TIFFRepresentationUsingCompression:
NSTIFFCompressionCCITTFAX3 factor:0.0];

Produces a raw tiff file (1.8MBs, definatly NOT what I wanted). This
compression method is supported according to Apple documentation (the
unsuppored ones say they are not supported).

For a few more tests, I tried the following, as (suggested by someone on
this list) to use in place of the TIFFRepresentationUsingCompression:

myDict = [NSDictionary dictionaryWithObject:@"NSTIFFCompressionPackBits "
forKey:@"NSImageCompressionMethod"];
myNewData = [myTIFFasBitMap representationUsingType:NSTIFFFileType
properties:myDict];

And I just get a raw tiff file (1.8MBs, defiantly NOT what I wanted).
Changing the compression type to anything else just gives me the same
result, raw tiff file.

So what have I learned.

-(NSData *)representationUsingType:properties: does nothing useful at all.
It just gives me raw tiff files, no matter what compression I ask it to use.
I also learned that TIFFRepresentationUsingCompression doesn't allow all the
compressions it says it does (it only works with 3 out of the 8 or so
listed).

So my question is now this. Are these not working because Apple has them set
up for them not to work, or is something going wrong? I ask this because
what I get from the documentation is that what is not working for me should
work. I would really appreciate someone from Apple commenting on this, if
they could.

Thanks,
Ben
_______________________________________________
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: Useless function or possible BUG?
      • From: "David W. Halliday" <email@hidden>
References: 
 >Re: Useless function... (From: Ben Mackin <email@hidden>)

  • Prev by Date: RE: Programming style (was Accessors) revisited ; de-compiler ???
  • Next by Date: Re: about my previous question
  • Previous by thread: Re: Useless function...
  • Next by thread: Re: Useless function or possible BUG?
  • Index(es):
    • Date
    • Thread