Skip navigation.
 
ml[loading 16-bit png,psd|loading tiff from stdout]
FROM : Josh Anon
DATE : Tue Jan 28 20:31:43 2003

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] initWithData:[readHandle
availableData]];
        while ([newD length] > 0) {
            [img appendData:newD];
            [newD release];
            newD = [[NSData alloc] initWithData:[readHandle
availableData]];
        }

        [newD release];

        NSImage *i = [[NSImage alloc] initWithData: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_removed>  ||  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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
ml[loading 16-bit png,psd|loading tiff from stdout] Josh Anon Jan 28, 20:31
mlRe: [loading 16-bit png,psd|loading tiff from stdout] nibs@mac.com Jan 28, 22:19
mlRe: [loading 16-bit png,psd|loading tiff from stdout] John C. Randolph Jan 29, 01:34
mlRe: [loading 16-bit png,psd|loading tiff from stdout] Josh Anon Jan 29, 04:39
mlRe: [loading 16-bit png,psd|loading tiff from stdout] John C. Randolph Jan 29, 22:51
mlRe: [loading 16-bit png,psd|loading tiff from stdout] Josh Anon Jan 29, 23:04