Re: [netatalk-admins] Corrupt images... hrrrmmm...


Subject: Re: [netatalk-admins] Corrupt images... hrrrmmm...
From: Vivek (vivek@imaginet.co.uk)
Date: Thu Oct 01 1998 - 06:34:09 EDT


On Wed, 30 Sep 1998, Neil McAllister wrote:

[snip]
> 1. Copy an image (say, a BMP) to a netatalk shared directory

Are you copying from a Mac or from another Unix directory? The first time
you access this file from a Mac, either to read or when you write to it,
netatalk will create its .AppleDouble file [the resource fork] with
type/creator info.

> 2. Run the conversion program to make it into a JPEG, on the Unix side

Ok, you've changed the type of the file: Are you creating a new file, or
renaming the old one? It matters from a type/creator perspective: If its a
new file, you should be Ok, if it's the same one, I'm not sure - I don't
know if netatalk redoes the resource fork if you do a name change on a
file.

> 3. Double click on the resulting JPEG. It opens with Picture Viewer --
> completely garbled looking.

Hmm... could be one of two things:

1] Looks like your default translation is TEXT/UNIX or similar. Try
   setting the default translation to BINA/TTXT, and make sure the 'type'
   field for .jpg and .jpeg isn't 'TEXT'

2] The files type/creator info hasn't been updated, the Mac thinks it's
   still looking at a BMP.

> 4. On the other hand -- fetch the file, using Netscape, by specifying an
> URL to the file on the Unix server. IT OPENS FINE.

Yeah, this is it: when Netscape gets the file, it

a) Won't do CR/LF translation
b) Will not fetch a resource fork, since http/ftp don't know about
   resource forks: If you're fetching it via ftp then the webserver will
   supply a mime-type from which the Mac will deduce the type/default
   creator info.

Have a peek at the resource fork of the .jpg file, make sure it's the
right type, and make sure you aren't getting unnecessary CRLF translation.

I can recommend setting the default to BINA/<something> and explicitly
setting only those types to TEXT that you _know_ need/want CRLF
translation even if this isn't you problem - saves a lot of trouble.

Vivek

-- 
It is easier to get forgiveness than permission.



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:33:22 EST