Re: [Gimp-user] Re: jpg (Resolved)

2005-10-28 Thread Joao S. O. Bueno Calligaris
I found the problem:

Mandriva 2006 is packaging a "ufraw-gimp" plug-in and it is trying to 
open these jpegs, instead of the normal jpeg plugin.

The ufraw-gimp plug-in is hanging.

I just saw it, and could not see if it is part of some "gimp-extras" 
package, or come inside the main gimppackage itself.

Gary: however an easy workaround is just disabling the ufraw-gimp 
plug-in.

Quit the GIMP, type as root:

chmod 644 /usr/lib/gimp/2.0/plug-ins/ufraw-gimp

- restart the GIMP, and voilá - you are able to open these jpegs once 
more.

Now - to open a completely unrelated bug on Mandriva's  bugzilla.  

(BTW, the files opened allright in the CVS GIMP  I've compiled in the 
same system, so it is not related to exif libraries or whatever)

Regards,
JS
-><-

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


Re: [Gimp-user] How to write a "simple" macro [newbie]

2005-10-28 Thread Carol Spears
On Fri, Oct 28, 2005 at 07:34:11PM +0200, Mauro Condarelli wrote:
> > On Thu, Oct 27, 2005 at 11:46:52AM +0200, Mauro Condarelli wrote:
> I had a look to the script-fu docs and I sincerely have some 
> problems orienting in there.
> First the good news: I have little problems with scheme, after 
> several thousand lines of elisp hacking.
> ..then the problems: I have problems finding the "right way" 
> to do things. I browsed the available procedures (Xtns->Procedure Browser),
> but I did *not* find everything I need (see below).
> 
i am more familiar with python but the two have the same capabilities,
for the most part -- as far as gimp is concerned.

The script-fu console has a browse button, i highly recommend this for
looking over the gimp procedures with.

> What I would like to do is:
> 1) start some script and create a new layer for the translation
>   (ok, I should be able to do that)

this is not a one step process.  everytime i write a script that does
this, it is one of the points where there can easily be breakage.  maybe
i will put my adding a layer with a python script on my web journal
today.

> 2) wait for a mouse click somewhere (I didn't find a way to do that)
>   I will click on the white area of some comics text bubble.

i don't know how to do this with python short of involving pygtk.  i do
not think there is an equivelent to pygtk with script-fu.

there is no run-interactive ability with gimp scripting right now.

> 3) get the coordinates of the pixel clicked (don't know how to do that)

easy with c.  with scripts it is more that you tell where to get
information from, such as fuzzy select:
(gimp-fuzzy-select drawable x y threshold operation antialias feather
feather-radius sample-merged)
where x and y are the coordinates of initial seed fill point: (image
coordinates)

if text balloons are the only white parts on the images, select by color
might be something to think about.

you can get the area of a selection via scripting:
(gimp-selection-bounds image) returns x1, y1, x2, y2

> 4) start the magic-wand with the mouse click coordinates (gimp_fuzzy_select)

an interactive plug-in like this would need to be written in c or would
need the help of a wrapped set of widgets to script with, like pygtk --
i mentioned this already.

> 5) remove the inner "holes" in the selection due to the text to be erased.
>   I found a less-than-satisfactory way of doing that using 
>   (gimp_selection_grow img 7)(gimp_selection_shrink img 8).
>   I would like to do it algorythmically, but I have no idea which
>   procedures to use.

consider after removing the white parts, inverting the selection 
(gimp-selection-invert image) to get rid of the text.

> 6) move the selection to the translation layer 
>   (gimp_image_add_channel tlayer (gimp_selection_save img) 0) (???)

(gimp-selection-float drawable offx offy) i think if you use x1 and y1
from (gimp-selection-bounds image) it will work.  then make a new layer
of that.

> 7) clear the selection (in translation layer)
>   (gimp_context_set_background (gimp_image_pick_color img clickX clickY))
>   (gimp_drawable_fill (gimp_selection_save img) GIMP_BACKGROUND_FILL)

if you make sure the layer transparency is toggled
(gimp-layer-set-lock-alpha layer lock-alpha) you should be able to fill
the original pixel region without a lot of extra steps.  to do this,
float your selection first and make that into a new layer.  then invert
the selection and fill that.  then toggle the transparency and fill the
whole layer.

> 8) open a box to edit text and then render it to the new selection in tlayer
>   (gimp_textget_extens_fontname)/(gimp_text_fontname) ??
>   How do I get the dimensions of the "useful" area?
>   How do I get the text inteh first place? I would need some kind 
>   of text input box, but I found nothing :(

no input boxen are available, but i have explained this already.  what
is available is the means to calculate the text area and adjust the font
to that.

> > > 4) Edit a (possibly long) string and fit it into the cleared 
> > region (eventually scaling the font to make it fit).
> > >
> > via scripts, there are many many ways to control text.  you can 
> > see this
> > if you look at Xtns-->PDB Browser and search for text.
> I found nothing.
> Only low level procedures to actually render a string.
> No way to edit it.

it will take some medium level math.

and gimp only works on its own text layers.  i think that what you want
to do cannot be done with gimp.  when you make a text layer, the string
is available to be read by gimp, however.  maybe future projects can
make use of this.

> > the text is on its own layer anyways.
> How it comes?
> I want it to be in its own layer, but I only found ways to render text, 
> no way to save the ascii (or unicode) version of it.
> What am I missing?

gimp only works with its own text.  you could keep the text that you
would like to be rendered in a text file an

[Gimp-user] Re: jpg

2005-10-28 Thread Olivier Ripoll

Olivier Ripoll wrote:


Gary,

Your file loads perfectly on my Gimp 2.2.8 on Windows at work. I will 
try it tonight on my self-compiled gimps at home on Mandriva LE2005.


I confirm your image loads perfectly on a Mandriva LE 2005 under both 
gimp 2.2.8 and 2.3.4.


Best regards,

Olivier

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