Re: Convert Image in NSImage to TIFF/PICT Format
Re: Convert Image in NSImage to TIFF/PICT Format
- Subject: Re: Convert Image in NSImage to TIFF/PICT Format
- From: Marco Binder <email@hidden>
- Date: Tue, 18 Mar 2003 10:44:07 +0100
This does not seem to be true, as I have already pointed out to Sindhu
last week. To initialize an NSPICTImageRep, you NEED to have data in
the PICT format already, according to the documentation. There is no
easy way to convert INTO the PICT data format.
As for any other bitmap file type, again, as pointed out before,
NSBitmapImageRep has the convenient method [bitmapimagerep
imageRepUsingType: NSSomeType properties: NSDictionary]. The method is
documented in the NSBitmapImageRep documentation, including the
possible values for the properties dictionary.
Sindhu, if you cant figure it out from the docs, get back to me
off-list and I can provide some sample code.
Marco
Well, you can always send a NSImage instance a "TIFFRepresentation"
message and it will give you an NSData object holding the TIFF data.
PICT and other formats are a little more difficult since you have to
get this TIFF data, then use that to create the correct type of Image
Rep (one of the NSImageRep subclasses) and then get its data in
whatever format you wanted.
If you need pointers on that, post back and I can post some code to
show you what I mean (but there might be some in the archives at
cocoa.mamasam.com).
Hope that helps,
Jeff.
On Tuesday, March 18, 2003, at 12:56 AM, Sindhu Gururaj wrote:
Hi All:
How do i convert a image in NSImage( say a BITMAP) into TIFF or PICT
file Format?
Any kind of help in the form of Code, Documentation and Links are
welcome.
I am newbie, kindly provide elaborate answers , if any.
Rgds,
Sindhu Gururaj.
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
_______________________________________________
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.
Jeff Disher
President and Lead Developer of Spectral Class
Spectral Class: Shedding Light on Innovation
http://www.spectralclass.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.
--
|\ /| E-Mail: email@hidden WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
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.