[loading 16-bit png,psd|loading tiff from stdout]
[loading 16-bit png,psd|loading tiff from stdout]
- Subject: [loading 16-bit png,psd|loading tiff from stdout]
- From: Josh Anon <email@hidden>
- Date: Tue, 28 Jan 2003 13:31:43 -0600
I posted this to cocoa-pro yesterday, but didn't get much of a reply,
so I figured I would see if anyone among the vast masses of cocoa-dev
knows :)
I've got a tool that uses ImageMagick, eventually outputting an image
to stdout. This code:
NSData *newD = [[NSData alloc] initWith
Data:[readHandle
availableData]];
while ([newD length] > 0) {
[img append
Data:newD];
[newD release];
newD = [[NSData alloc] initWith
Data:[readHandle
availableData]];
}
[newD release];
NSImage *i = [[NSImage alloc] initWith
Data:img];
reads it in and makes an image. Unfortunately, if I have ImageMagick
dump a 16-bit png or psd file (i've checked and it really does output a
HDR file), the image rep is only 8 bits. Problem 2 is that if I have
ImageMagick output a TIF, a tif that opens fine in preview if I dump it
to a file, the above code returns an empty image--cocoa can't make an
image rep from the tif.
Does anyone here have similar experience or thoughts on a solution?
Since these are > 70 MB files it's dumping out, writing to the HD and
reading back in really isn't a good option.
Thanks,
Josh
--
email@hidden ||
http://www.areax.net
"I'm going to upgrade my SE/30 to 64 meg of RAM so I can actually cache
the entire disk." --Unknown
_______________________________________________
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.