[texworks] message from TeXworks user
bvoisin at me.com
Sun Feb 14 16:59:57 CET 2010
Le 14 févr. 2010 à 11:52, Daniel Becker a écrit :
> Am 13.02.2010 um 23:56 schrieb Bruno Voisin:
>> Thanks for bringing attention to this software, I wasn't aware of its existence. It seems not to have undergone updates for a long time, is it still maintained?
> Yes, I didn't know sam2p, too. There us a google-code page
> and it looks as if there is activity. Maybe it is not too difficult to compile(?) it on Mac OS X?
Compilation seems straightforward. I just downloaded <http://sam2p.googlecode.com/files/sam2p-0.47.tar.gz> then did the following (after cd'ing to the directory ~/Downloads/sam2p-0.47 where the archive had been unpacked):
./configure --enable-lzw --enable-gif
sudo make install
There were a number of lines displayed in Terminal, I didn't have the patience to go through them (nor competence to understand them). But it seemed compilation worked in any case, a binary sam2p is created and installed in /usr/local/bin (same as where MacTeX installs gs and convert). There's no man page, the only doc is the README which they recommend to put at /usr/share/doc/sam2p (I've chosen /usr/local/share/doc/sam2p instead).
Seems to work fine. With a BMP file sent by a collaborator, test.bmp say, I tried in sequence
sips --setProperty format png test.bmp --out test-sips.png
convert test.bmp test-convert.png
sam2p test.bmp test-sam2p.png
sips --setProperty format pdf test.bmp --out test-sips.pdf
convert test.bmp test-convert.pdf
sam2p test.bmp test-sam2p.pdf
All output files look fine and identical to the original BMP file. As for the size:
-rw-r--r-- 1 bvoisin wheel 46394 14 fév 16:37 test-convert.pdf
-rw-r--r-- 1 bvoisin wheel 14955 14 fév 16:36 test-convert.png
-rw-r--r-- 1 bvoisin wheel 10495 14 fév 16:37 test-sam2p.pdf
-rw-r--r-- 1 bvoisin wheel 11324 14 fév 16:36 test-sam2p.png
-rw-r--r-- 1 bvoisin wheel 26873 14 fév 16:37 test-sips.pdf
-rw-r--r-- 1 bvoisin wheel 23328 14 fév 16:36 test-sips.png
-rw-r--r-- 1 bvoisin wheel 983094 25 jui 2008 test.bmp
So it seems sam2p does indeed produce the smallest files. According to the doc, there are limitations regarding transparency (only one alpha channel is allowed) and colour modes (only RGB is supported), but I've no idea whether this is really a limitation compared with the other converters.
More information about the texworks