Re: patch for TGA save

2000-08-13 Thread Mattias EngdegÄrd

>I noticed that many programs have trouble reading RLE compressed
>TGAs produced by the Gimp.  The problem is that the TGA saver
>produces packets that wrap over line boundaries.
[...]
>However this is for new format TGA files, whereas the Gimp saves in
>the original format, which does allow for wrapping (i.e. it doesn't
>explicitly say it's not allowed).
>
>I thought it was best to let the user decide what to do.  The patch,
>made against `plug-ins/common/tga.c' in 1.1.24, is attached.

I don't think the user should have any say; TGA should always accept
wrapped packets and never generate any (according to the old rule of
network engineering: Be conservative in what you send, and liberal in
what you accept).

This will make compressed images at most O(number of lines) bigger,
so it's not devastating.




patch for TGA save

2000-08-13 Thread Peter Wang

[I'm not sure where to post this, but I hope this is okay.]

I noticed that many programs have trouble reading RLE compressed
TGAs produced by the Gimp.  The problem is that the TGA saver
produces packets that wrap over line boundaries.  Quoting from the
TGA specs I found somewhere at ftp://ftp.truevision.com:

  "Run-length Packets should never encode pixels from more than one
  scan line.  Even if the end of one scan line and the beginning of
  the next contain pixels of the same value, the two should be
  encoded as separate packets.  In other words, Run-length Packets
  should not wrap from one line to another."

However this is for new format TGA files, whereas the Gimp saves in
the original format, which does allow for wrapping (i.e. it doesn't
explicitly say it's not allowed).

I thought it was best to let the user decide what to do.  The patch,
made against `plug-ins/common/tga.c' in 1.1.24, is attached.

Please Cc: any replies to me as I am not subscribed to this list.

-- 
[EMAIL PROTECTED] - http://www.psynet.net/tjaden/
A witty remark proves nothing.

 gimp-tga-wrap.diff.gz