• 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: Reading multi-frame TIFF's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading multi-frame TIFF's


  • Subject: Re: Reading multi-frame TIFF's
  • From: Rick Hoge <email@hidden>
  • Date: Fri, 11 Mar 2005 09:13:31 -0500


NSArray *repList = [NSImageRep <x-tad-bigger>imageRepsWithContentsOfFile:fName</x-tad-bigger>];

Thanks very much for this detailed an clear reply! The above method did the trick perfectly. I was mislead by some of the frame-related constants having to do with animated GIF's.

Rick

or similar methods. The reps can also be found with:
NSImage *img = [[NSImage alloc] <x-tad-bigger>initWithContentsOfFile:fName];
</x-tad-bigger>
NSArray *repList = [img representations];
(Remember that an NSImage is only a wrapper for zero, one ore more
representations. And remember that an NSImage draws only one of the
many representations selected by some heuristics.)
If (for depicting the reps) you need NSImages for all representations, do this
for( all reps ){
NSImage *newImg = [[NSImage alloc] initWithSoize:NSZeroSize];
[newImg addRepresentation:[repList objectAtIndex:i]];
[listOfNewImages addObject:[newImg autorelease]];
}

Creating a multi-"page" / multi-"frame" TIFF file do this
(or use a similar construct with NSImage):
NSData *tiffData = [NSBitmapImageRep <x-tad-bigger>TIFFRepresentationOfImageRepsInArray:repList</x-tad-bigger>];
[tiffData writeToFile:nameOfATiffFile atomically:YES];


--
Heinrich Giesen

email: 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: 
 >Re: Reading multi-frame TIFF's (From: Heinrich Giesen <email@hidden>)

  • Prev by Date: simple AppKit / multithreading question
  • Next by Date: NSPopUpButtonCell in custom NSTableColumn in NSTableView - not changing value
  • Previous by thread: Re: Reading multi-frame TIFF's
  • Next by thread: NSFileHandleConnectionAcceptedNotification
  • Index(es):
    • Date
    • Thread