Re: What about OCR ?

2005-10-04 Thread Liam R E Quin
On Sun, 2005-10-02 at 19:37 -0600, Michael Torrie wrote:
 On Sun, 2005-10-02 at 09:43 +0200, Alpe.Nusslé wrote:
  I'm french and I cannot undurstand a long text in english, so I try to 
  send you this request.
  
  Can we get an OCR function (reconnaissance de caractères en français) 
  with GIMP ?

Unfortunately I have yet to find an open source or Free OCR program
that works reliably for me.  The best I have used is Finereader
made by http://abbyy.com/ but it is commercial, and I think runs
only under Microsoft Windows, or at any rate is not supported under
any Free operating environment.

There is also gocr but this is much less effective.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Building interfaces in GTK: apart GLADE ??

2005-10-04 Thread Colossus

Hi,

I was told that the code that Glade generates is deprecated.
Apart it and libglade what are other tool who allows me to
build a complete GTK GUI with menus and statusbar ?

Regards
--
Colossus

Cpsed, a Linux OpenGL 3D scene editor
http://cpsed.sourceforge.net/

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: What about OCR ?

2005-10-04 Thread Iago Rubio
On Sun, 2005-10-02 at 09:43 +0200, Alpe.Nusslé wrote:
 I'm french and I cannot undurstand a long text in english, so I try to 
 send you this request.
 
 Can we get an OCR function (reconnaissance de caractères en français) 
 with GIMP ?
 
 I would like to read text that I had got with a camera.
 And the must wil be to read a music partition to translate in midi code 
 or something else...

Take a look at ocrad,
http://www.gnu.org/software/ocrad/ocrad.html
-- 
Iago Rubio

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


problem when setting several times a pixbuf in a gtk image

2005-10-04 Thread Vincent Torri

Hello,

I use the following function to draw a frame in a gtk_image:

static void draw_frame (long int frame_nbr)
{
  GdkPixbuf *pixbuf;
  const BYTE *rgb;
  PClip vclip_rgb32 = ToRGB32::Create(vclip);
  CPVideoFrame frame = vclip_rgb32-GetFrame(frame_nbr);
  guint width = frame-GetDimension().GetWidth();
  guint height = frame-GetDimension().GetHeight();

  rgb = frame-ReadFrom('~').ptr;

  gtk_widget_set_size_request (image, width, height);
  pixbuf = gdk_pixbuf_new_from_data (rgb,
 GDK_COLORSPACE_RGB, TRUE,
 8, width, height, 4 * width,
 (GdkPixbufDestroyNotify) g_free,
 (guint8 *)rgb);
  gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
  g_object_unref (G_OBJECT (pixbuf));
}

The first time that I use this function, there's no problem, the pixbuf is
drawn.

But when I call this function another time, it segfault during
gtk_image_set. Does someone see what is wrong ?

thank you

Vincent Torri
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Size of text entries

2005-10-04 Thread flood
Hello, In my app I have a text entry widget that will display a small
number, usually 1-10. However, when I added the entry widget I noticed it
was very big compared to the amount of text that will be stored in it. Also
I should mention the user will not be changing the text inside the entry but
the computer will. My question to you is, is there a way I can change the
size of the entry? If not than are there any alternative widgets out there
that are suitable for what I want to do (i.e. small text box, user doesn't
change text inside)?

--
~flood
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: problem with gtk_tree_view_set_fixed_height_mode()

2005-10-04 Thread Brian J. Tarricone
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/4/2005 5:07 AM, Stefan Kost wrote:
 Brian J. Tarricone schrieb:
 
Hi all,

I'm trying to use GtkTreeView's fixed height mode for a playlist that
can hold thousands of items, but I'm having a bit of trouble.  All I
seem to get is:

Gtk-CRITICAL **: gtk_tree_view_insert_column: assertion
`gtk_tree_view_column_get_sizing (column) == GTK_TREE_VIEW_COLUMN_FIXED'
failed

I've tried gtk_cell_renderer_text_set_fixed_height_from_font() (I have
three columns, all text renderers), but no help there; I still get the
above critical message.
 
 
 This works for me:
 
 gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1);
   if((tree_col=gtk_tree_view_column_new_with_attributes(_(Pos.),renderer,
 text,SEQUENCE_TABLE_POS,
 foreground-set,SEQUENCE_TABLE_TICK_FG_SET,
 NULL))
 ) {
   g_object_set(tree_col,
 sizing,GTK_TREE_VIEW_COLUMN_FIXED,
 fixed-width,40,
 NULL);
   col_index=
 gtk_tree_view_append_column(self-priv-sequence_table,tree_col);
 }
 else GST_WARNING(can't create treeview column);
 
 
 I was initially using gtk_tree_view_insert_column_with_attributes() and
 got lots of assertions too. In this case it seems to be required to
 create the column, set the fixed-width and append (or insert) it.

That sounds kinda icky.  Where are you getting the value of '40' for the
 'fixed-width' parameter?  Just making it up?

Unfortunately, I *can't* use fixed-width columns, as the user needs to
be free to resize the containing window (and the treeview should resize
to match, with the middle column growing or shrinking as necessary).  I
still don't understand why GtkTreeView requires a fixed *width* column
in order to enable fixed *height* mode.

-brian


 
 Stefan
 
 
If I set the sizing of each column to GTK_TREE_VIEW_COLUMN_FIXED, I get
4500 blank rows, and only the middle column header is visible (probably
because I set its 'expand' property to TRUE).  Not too useful.

I'm not understanding why fixed height mode has anything to do with the
sizing mode, since (according to the docs[1]), the sizing mode is only
used to determine the _width_ of the cell, not the height.

Can someone enlighten me here?

Thanks,
Brian

[1] The sizing method the column uses to determine its *width*. Please
note that GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views,
and can make columns appear choppy.  (emphasis mine)

 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFDQwAf6XyW6VEeAnsRAr7AAJ4uFL60XMTaU7Q4ShYbtCEaHQJpAQCgmRER
VmIVtO2Kf2RqddvDRZIcxaE=
=dzr9
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Size of text entries

2005-10-04 Thread Olivier Sessink
flood wrote:
 Hello, In my app I have a text entry widget that will display a small
 number, usually 1-10. However, when I added the entry widget I noticed it
 was very big compared to the amount of text that will be stored in it. Also
 I should mention the user will not be changing the text inside the entry but
 the computer will. My question to you is, is there a way I can change the
 size of the entry? 

use
gtk_widget_set_size_request ()

but if the user doesn't change the data, why not use a GtkLabel ?

regards,
Olivier
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list