[comp.sys.next] TIFF's under 2.0

sdesai@polyslo.CalPoly.EDU (Sujay) (06/01/91)

I have been using MacImage to scan some pictures which I save
as uncompressed TIFFs. When I upload them to a NeXT running 2.0
it won't recognize them! Has anyone else had this problem?
any suggestions as to what I should do?

Thanks,

eps@toaster.SFSU.EDU (Eric P. Scott) (06/01/91)

In article <2846effc.234@polyslo.CalPoly.EDU>
	sdesai@polyslo.CalPoly.EDU (Sujay) writes:
>I have been using MacImage to scan some pictures which I save
>as uncompressed TIFFs. When I upload them to a NeXT running 2.0
>it won't recognize them! Has anyone else had this problem?
>any suggestions as to what I should do?

Did you transfer the data fork as binary (and ensure that the
file has a .tiff extension on the NeXT side)?  I've used several
different scanners and scanning programs on Macs and never had
a problem with NeXT 2.x.

What does  tiffutil -info  say?

					-=EPS=-

cnh5730@maraba.tamu.edu (Charles Herrick) (06/02/91)

In article <1638@toaster.SFSU.EDU> eps@toaster.SFSU.EDU (Eric P. Scott) writes:
   What does  tiffutil -info  say?

Totally cool!!! Thanks Eric...

This only goes to prove what I have been saying for a while now, that
one could whack everything from c.s.n. but the posts from eps@toaster
and still be dragged up the NeXT learning curve tr'es rapidement!

-- Chuck

alex@cosmos.acs.calpoly.edu (Alex Raftis) (06/06/91)

In article <1638@toaster.SFSU.EDU>, eps@toaster.SFSU.EDU (Eric P. Scott) writes:
> In article <2846effc.234@polyslo.CalPoly.EDU>
> 	sdesai@polyslo.CalPoly.EDU (Sujay) writes:
> >I have been using MacImage to scan some pictures which I save
> >as uncompressed TIFFs. When I upload them to a NeXT running 2.0
> >it won't recognize them! Has anyone else had this problem?
> >any suggestions as to what I should do?
> 
> Did you transfer the data fork as binary (and ensure that the
> file has a .tiff extension on the NeXT side)?  I've used several
> different scanners and scanning programs on Macs and never had
> a problem with NeXT 2.x.
> 
> What does  tiffutil -info  say?
> 
> 					-=EPS=-

I've been working with the original poster trying to get things to
work. Here's the error generated when one of my programs, (or any
for that matter) try to read the tiff files in question:

TIFF Error: Wrong data type 3 for field "SubfileType".
Error #1: Bad Image Format

The output from tiffutil is the same. Basically, the internal NeXT
routines cannot be used to read the tiff image. I doubt it's a trans-
fer problem, however, because about 8 of the TIFF's I scanned a few
months ago display correctly under 1.0 without a catch. The problem
only began with 2.0. Also, one of the utility we have on our NeXT's 
is tifftoeps, which also works, as it apparantly doesn't use the
built in NeXT calls to read the image. We can do this transfew, and
then use scene to convert back to TIFF, but we loose all but 2 bits
of the color data. I've yet to try tiffs from other programs on our
macs, however.

Alex Raftis

blanford@spf.trw.com (Ronald P. Blanford) (06/07/91)

In article <1991Jun6.002304.1187@petunia.CalPoly.EDU>  
alex@cosmos.acs.calpoly.edu (Alex Raftis) writes:
> In article <2846effc.234@polyslo.CalPoly.EDU>
> 	sdesai@polyslo.CalPoly.EDU (Sujay) writes:
> >I have been using MacImage to scan some pictures which I save
> >as uncompressed TIFFs. When I upload them to a NeXT running 2.0
> >it won't recognize them! 
>
> TIFF Error: Wrong data type 3 for field "SubfileType".
> Error #1: Bad Image Format
> 

This one bit me, too.  If you are familiar with the TIFF format and directory 
structure, all you have to do is change the data type to 4.  The tag for the 
SubfileType field is FE.  I did it using emacs, with difficulty.

aozer@next.com (Ali Ozer) (06/07/91)

In article <1991Jun6.002304.1187@petunia.CalPoly.EDU> Alex Raftis writes:
>TIFF Error: Wrong data type 3 for field "SubfileType".
>Error #1: Bad Image Format

The SubfileType field is an obsolete TIFF field which is supposed to
have one short value. Well, judging from the error message above, your
file does seem to have the correct type (type 3 is short). Looks like
there is a bug in NextStep's interpretation of the SubfileType field.

Almost any application which writes TIFF files will probably write out the 
NewSubfileType field.  You might want to try to find an app which can
read the SubfileType field correctly; hopefully such an app will read your
files fine and be able to create TIFFs with NewSubfileType fields which
NextStep will accept.

This is the first time I've heard of TIFFs with this problem (ie, TIFFs with 
this obsolete field in them)... Which app did you say generated these files?

Ali, Ali_Ozer@NeXT.com

aozer@next.com (Ali Ozer) (06/08/91)

In article <909@rosie.NeXT.COM> aozer@next.com (Ali Ozer) writes:
>In article <1991Jun6.002304.1187@petunia.CalPoly.EDU> Alex Raftis writes:
>>TIFF Error: Wrong data type 3 for field "SubfileType".
>>Error #1: Bad Image Format
>The SubfileType field is an obsolete TIFF field which is supposed to
>have one short value. Well, judging from the error message above, your
>file does seem to have the correct type (type 3 is short). Looks like
>there is a bug in NextStep's interpretation of the SubfileType field.

Well, turns out I'm wrong; the bug isn't in the TIFF library but in the 
TIFFs themselves. (Thanks to Sam Leffler for pointing this out...)

I was confused by the error message: The NextStep TIFF library (which is 
based on Sam's TIFF library) refers to the obsolete SubfileType field 
as "OldSubfileType" and refers to the new one as "SubfileType." Thus it seems 
like the TIFF file in question has the new field, but with a short 
value.  The spec says that this field should have a long value, so in 
this case the TIFFs seem to be bad.  

Thus it might be more difficult than I thought to find a program which
can actually read them in.

Ali, Ali_Ozer@NeXT.com