gimpusers.com logo
German version English version

Not logged in

Sign up! | Lost password?

Latest discussion

  1. gimp-docs | yesterday 10:55 PM
    a new user perspective
  2. gimp-developer | yesterday 08:04 PM
    scanner support should be File->Acquire
  3. gegl-developer | yesterday 06:24 PM
    babl docs
  4. gimp-docs | yesterday 12:46 PM
    GIMP Manual
  5. gimp-user | yesterday 09:42 AM
    Bug

External news

Poll

How good are you at programming?

OMG, that is nothing for me at all!

I've been coding a little bit but I'm not very fit at it

I'm pretty good at programming and would maybe be able to write a Plug-In for GIMP

I'm very good at programming and I would theoretically be able to hack for the GIMP core

See results

Stats

gimpusers.com RSS feed

GIMP Forums » For GIMP developers

Access Image in Plugin?

Jump to message:

  1. Access Image in Plugin? — Rob Antonishen, 02 Jul 2009 11:44 PM
    1. Access Image in Plugin? — Sven Neumann, 03 Jul 2009 08:41 PM

As a registered user, you can subscribe forum threads in order to get notified when replies are posted. Just log in at the right top of the page if you already have an account, otherwise you can register for free.

Permalink:3644709b0907021444g1d44d3d1p9feab88af...
Date:02 Jul 2009 11:44 PM
From:Rob Antonishen
Subject:Access Image in Plugin?
Hi-

I'm trying to get (in order to modify) the active selection (channel)
in a C plugin I am writing.

I assume I can simply use gimp_image_get_mask (image) but I can't see
how to get the image object!

All the examples show accessing the drawable object using
gimp_drawable_get (param[2].data.d_drawable)

I know I can access the image ID using param[1].data.d_image, but the
only call seems to be gimp_image_get_by_ID which requires a first
parameter *gimp which I can't determine how to get! (Oddly enough, I
could image->gimp if I had the image object but that is a bit chicken
and egg situation...)

Can anyone provide a pointer, or tell me if there is a better way to
get the current selection (channel).

Thanks in advance...

-Rob A>
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview
Permalink:1246646500.4345.12.camel@bender
Date:03 Jul 2009 08:41 PM
From:Sven Neumann
Subject:Access Image in Plugin?
Hi,

On Thu, 2009-07-02 at 17:44 -0400, Rob Antonishen wrote:

> All the examples show accessing the drawable object using
> gimp_drawable_get (param[2].data.d_drawable)
>
> I know I can access the image ID using param[1].data.d_image, but the
> only call seems to be gimp_image_get_by_ID which requires a first
> parameter *gimp which I can't determine how to get! (Oddly enough, I
> could image->gimp if I had the image object but that is a bit chicken
> and egg situation...)

I think you are mixing GIMP core API and GIMP plug-in API here.
gimp_image_get_by_ID() is core API and not accessible to plug-ins. Same
holds true for the Gimp object.

What's the problem about using param[1].data.d_image ? The plug-in API
works with image IDs, there is no image struct or object in libgimp.


Sven
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview

Adobe® Photoshop® is a registered trademark of Adobe Systems, Inc. Linux is a trademark of Linus Torvalds. Ubuntu and Canonical are registered trademarks of Canonical Ltd. | Clock times are shown as CET / CEST | Imprint / Privacy policy | powered by bitfire it services | sponsored by Hirners Hotel Guide