[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Read mackintosh jpg file under linux
On 11-Dec-05 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.
>
> Peter C
Jumping in here with a background of moderate ignorance ...
My experience is that (at least under the old MacOS) a Mac "file"
is really two files -- the main data content, and a header that
contains metadata (so that the OS will know what it is and what
can be done with it; beats using the file extension like some
"other" OSs do).
So it could be that this is what is throwing the attempt to
open it.
Anyway, assuming that you need to strip the first 128 bytes,
one way to do it is to use "dd":
dd if=YourMacFile of=YourLinuxFile bs=1 skip=128
(replacing "YourMacFile" with its filename, and "YourLinuxFile"
with the name you want to give the new one). The key is that
"bs=1" sets the block size to a single byte, so that the
"skip=128" tells it to skip the first 128 blocks i.e. bytes.
(Of course you could equivalently have done it with "bs=128"
and "skip=1", but there you go: you have to choose something
from all those possibiltiies).
See "man dd" for explanations of the elements of the command.
Best wishes,
Ted
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding [at] nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 11-Dec-05 Time: 20:17:38
------------------------------ XFMail ------------------------------
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.