Re: [Gimp-developer] PBM

2005-09-09 Thread lode leroy

I'm using GIMP to do some scans, then crop and *try* to improve
the image before feeding it to the GNU OCRAD OCR package.
In the mean time, I have found unpaper which looks promising...
maybe someone needs to turn that into a plugin...



From: michael chang [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: lode leroy [EMAIL PROTECTED]
Subject: Re: [Gimp-developer] PBM
Date: Wed, 7 Sep 2005 16:27:45 -0400

On 9/7/05, lode leroy [EMAIL PROTECTED] wrote:
 Would it be possible to support the .pbm as extension in Save As in
 GIMP?

It should be possible.  The question is whether or not someone wants
to do it.  There is a pbm loader, so I presume that that could be used
as a basis or reference for a writer, but still... probably, but why
would you need this?

There are plenty of good programs that can convert to the pbm format
from formats that GIMP does save in, (and maybe produce better files
than GIMP would be able to? I'm not sure) and they probably can do a
pretty good job as-is.

Are you locked into the pbm format?  Because for information
preservation, formats like XCF and PNG also do really well.

The key would be to write a PBM output plugin, I think.

That said, if a PBM is a renamed version of a different file type that
can be output by GIMP, you can manually select the output file type
(although in that case, adding pbm as a default extension of that
file may be something that is wanted).

I don't suppose PBM is supported in 2.3.3/CVS, is it? Or if it is,
does it require any special libraries?

--
~Mike
 - Just my two cents
 - No man is an island, and no man is unable.



___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] PBM

2005-09-09 Thread John Cupitt
On 9/9/05, lode leroy [EMAIL PROTECTED] wrote:
 That said, if a PBM is a renamed version of a different file type that
 can be output by GIMP, you can manually select the output file type
 (although in that case, adding pbm as a default extension of that
 file may be something that is wanted).
 
 I don't suppose PBM is supported in 2.3.3/CVS, is it? Or if it is,
 does it require any special libraries?

I've written a couple of PBM/PGM/PPM import/export filters (though not
for the Gimp). The format is very simple, which I guess is why the GNU
OCR program likes it. An image looks something like (from memory,
untested):

P2 3 3 255
12 3 45
23 43 255
245 128 0

Meaning this is a one-channel, many bit ascii image, 3 x 3 pixels,
with 255 as the max value per channel. There are also binary modes
(phew), colour versions, and 8 bit versions.

LGPL code here:

http://cvs.sourceforge.net/viewcvs.py/vips/vips-7.11/libsrc/conversion/im_vips2ppm.c?view=markup
http://cvs.sourceforge.net/viewcvs.py/vips/vips-7.11/libsrc/conversion/im_ppm2vips.c?view=markup

John
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer