[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Read mackintosh jpg file under linux



Peter Collier wrote:
On Sunday 11 December 2005 14:54, John Southern wrote:

On Saturday 10 Dec 2005 23:55, Peter Collier wrote:

Hi all, I've received 4 jpg files from an american firm who were
doing a "shoot" at my firm. These files came from a mac computer
and I can't view them. I've looked at macutils package, googled
around for a couple of days but can't make sense as to what to
do.

snip.

You can convert Apple Mac PICT/JPEG files with jpeg2ps or picttpppm

In some cases it is a JFIF file but with the usual MacBinary header
(Just take off the first 128 bytes to remove this).

PICT is lossless but also has very poor compression.

John

I've tried jpeg2ps but I end up with a 0 bytes file. Opening with kate the top line of the file says, This file must be opened with BinHex ver 4.0. Running binhex on these files gives the message File is not a MacBinary. A bit of a contradiction?
The first 3 lines are:-

(This file must be converted with BinHex 4.0)

:$%P04e!e0$Fb,QT`C`"+8%9(!!!!!!!!!!,eT!!!!!#TaIrBrq(Xfd9iD [at] B!!%e

I'm not sure when you say to delet the first 128 bytes, what in the represents 128 bytes.

A byte is 8 bits. If you look at the file in a hexdumping program then you will see characters expressed as hexadecimal digits i.e. using the digits 0-9 and the letters A-F. Each hexadecimal digit is 4 bytes long. Therefore remove the first 256 hexadecimal digits and you'll have removed the first 128 bytes.

Interestingly: look at a Java class in a hexdumping program and you will find CAFEBABE as the contents of the first 4 bytes :).

:)

L.



___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

GNU the choice of a complete generation.