RSS/Atom feed Twitter
Site is read-only, email is disabled

PBM

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

PBM lode leroy 07 Sep 13:19
b14e81f0050907132764057d7a@... 07 Oct 20:24
  PBM lode leroy 09 Sep 11:13
   PBM John Cupitt 09 Sep 12:34
lode leroy
2005-09-07 13:19:53 UTC (over 18 years ago)

PBM

Would it be possible to support the ".pbm" as extension in "Save As" in GIMP?

-- lode

lode leroy
2005-09-09 11:13:13 UTC (over 18 years ago)

PBM

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
Reply-To: thenewme91@gmail.com
To: lode leroy
Subject: Re: [Gimp-developer] PBM
Date: Wed, 7 Sep 2005 16:27:45 -0400

On 9/7/05, lode leroy 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.

John Cupitt
2005-09-09 12:34:55 UTC (over 18 years ago)

PBM

On 9/9/05, lode leroy 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