gimpusers.com logo
German version English version

Not logged in

Sign up! | Lost password?

Latest discussion

  1. gimp-developer | yesterday 11:30 PM
    GIMP distributing sRGB profiles: license issues?
  2. gimp-user | yesterday 10:47 PM
    Bug in the Gradient tool ?
  3. gimp-user | yesterday 10:24 PM
    ?? Status of remembering Layers setting for Canvas Resizing -- in most recent version
  4. gimp-developer | yesterday 10:18 PM
    GIMP color-management spec and further discussion
  5. gimp-developer | yesterday 09:36 PM
    More on tagging

External news

Poll

Would you like to be able to use your Google/Yahoo/MSN (OpenID) login on gimpusers, too?

Definately! I would enjoy the possibility to use my OpenID on different websites!

I don't have a special need for OpenID but I think it could be useful

Doesn't matter to me

Never, OpenID is a pain regarding privacy and personal data protection!

No. (please post a comment)

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