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

Re: Quartz over GhostScript


  • Subject: Re: Quartz over GhostScript
  • From: Ben Mackin <email@hidden>
  • Date: Sun, 16 Jun 2002 15:01:15 -0700

on 6/14/02 8:20 PM, Vince DeMarco at email@hidden wrote:

> That would be easy, write a small Cocoa Application that loads the PDF
> into an NSImage and then tell that NSImage to get its
>
> - (NSData *)TIFFRepresentation;
> - (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp
> factor:(f
> loat)aFloat;
>
> and save the resulting NSData to disk.

Ok, in doing this I read up on the compressions I can use, and I fuond the
one I need:

NSTIFFCompressionCCITTFAX3
CCITT Fax Group 3 compression. It's for one-bit fax images sent over
telephone lines.

However, when I do this:

myPDF = [[NSImage alloc] initWithContentsOfFile:@"/tmp/send/myFile.pdf"];

myTiffData = [myPDF
TIFFRepresentationUsingCompression:NSTIFFCompressionCCITTFAX3 factor:nil];
[myTiffData writeToFile:@"/tmp/send/Output.tif" atomically:YES];

The resulting image is a full color tiff (it looks exactly like the pdf
file). From my understanding, I should have gotten a 1-bit, black and white
image. What went wrong? Did I read into this too much, or am I not saving it
with CCITT Fax Group 3 compression?

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.

References: 
 >Re: Quartz over GhostScript (From: Vince DeMarco <email@hidden>)

  • Prev by Date: [ANN] Reminder: Foundation Collections Palette
  • Next by Date: Carbon Header Problem in my Cocoa App...
  • Previous by thread: Re: Quartz over GhostScript
  • Next by thread: 8b color NSBitMapImageReps--no such thing?
  • Index(es):
    • Date
    • Thread